Get library codenow triggers
GET/libraries/:libraryId/triggers
Get library codenow triggers
Request
Path Parameters
Possible values: non-empty
Header Parameters
CodeNOW API Key
Responses
- 200
- 400
- 401
- 403
- 404
- 429
- 500
Library triggers response
- application/vnd.codenow.v1+json
- Schema
- Example (from schema)
Schema
Array [
]
A boolean flag indicating whether the configuration file .codenow.triggers.yaml
containing the trigger configuration exists in this library's repository.
If set to false, no triggers have been defined yet.
triggers
object[]
required
A list of objects representing all triggers currently defined for this library.
The event that will activate this trigger on every occurrence. The default value is push
Possible values: non-empty
The pipeline used for building the library.
It generally depends on the template (language, build tool, framework) the library is based on.
A boolean flag indicating whether the trigger is active.
If missing or set to false, the trigger will stay defined in the configuration file, but will not execute.
Possible values: non-empty
The git branch(es) associated with the trigger. event
occurrences on this branch will execute the trigger.
You can specify either a single branch name or a glob pattern potentially matching multiple branches.
The primary action executed by the trigger.
For libraries, only release
is a valid value, representing the release build.
version
object
nullable
Specifies how to determine the next version of the library.
You can provide either your own version pattern or a branch pattern.
If no value is provided, the patch version for the last major and minor path will be incremented.
The semver pattern used for versioning the library builds.
Use pattern with wildcards to specify release version
(? latest, + increment, i.e. 1.?.+ will increment patch version for the latest version where major path is 1).
Possible values: non-empty
The release version will be determined from the branch name following this pattern.
${MAJOR}, ${MINOR} can be used as placeholders. i.e release/${MAJOR}.${MINOR} for release/1.5
will creates 1.5.0, 1.5.1, etc builds versions.
{
"present": true,
"triggers": [
{
"event": "string",
"pipeline": "string",
"enabled": true,
"branch": "string",
"type": "string",
"version": {
"pattern": "string",
"branchPattern": "string"
}
}
]
}
The request was unacceptable, often due to missing a required parameter.
No valid API key provided.
The API key doesn't have permissions to perform the request.
Resource not found.
Too many requests hit the API too quickly. We recommend an exponential backoff of your requests.
Something went wrong on CodeNOW's end.