Description: Gets a collection of resources. Filter criteria can be supplied via query string parameters. Gets all resources if no query parameters are supplied.
Security: Requires a valid user
Usage: GET api/v1/resources
Query Parameters:
Parameter | Data Type | Description |
|---|---|---|
| string | Optional. Comma-separated list of pipelineSource ids |
| string | Optional. Comma-separated list of resource ids |
| string | Optional. Comma-separated list of project ids |
| string | Optional. Comma-separated list of resource names |
| string | Optional. Comma-separated list of resource type codes |
| string | Optional. Comma-separated list of pipeline source branches |
| boolean | Optional. Default is false. Filters based on the |
| string($date-time) | Optional. Filters for resources where |
| boolean | Optional. Default is false. Filter based on the |
| boolean | Optional. Default is false. Filter based on the |
| string | Optional. Comma-separated list of project integration IDs |
| string($date-time) | Optional. Runs created before the date |
| string($date-time) | Optional. Runs created after the date |
| string($date-time) | Optional. Runs triggered before the date |
| string | Optional. Comma-separated list of sort attributes |
| integer | Optional. 1 for ascending and -1 for descending based on |
| integer | Optional. A limit on the number of resources returned. |
| integer | Optional. A cursor for use in pagination. |
Produces: application/json
Sample Usage:
Example: Get all the build info resources defined across all the pipelines
GET api/v1/resources?typeCodes=2018
[
{
"id": 2019,
"projectId": 1,
"pipelineSourceId": 1181,
"createdAt": "2020-02-23T00:42:48.028Z",
"updatedAt": "2020-02-23T00:42:52.946Z",
"ymlConfigPropertyBag": {
"integrationName": "art",
"integrationAlias": "sourceArtifactory"
},
"systemPropertyBag": {},
"staticPropertyBag": {},
"yml": {
"name": "svc_build_info_sample",
"type": "BuildInfo",
"configuration": {
"sourceArtifactory": "art",
"buildName": "svc_build",
"buildNumber": 1
}
},
"name": "svc_build_info_sample",
"pipelineSourceBranch": null,
"projectIntegrationId": 65,
"typeCode": 2018,
"latestResourceVersionId": 2634,
"isDeleted": false,
"deletedAt": null,
"isConsistent": true,
"isInternal": false,
"syntaxVersion": "v1.0",
"nextTriggerTime": null
},
{
"id": 2018,
"projectId": 1,
"pipelineSourceId": 1181,
"createdAt": "2020-02-23T00:42:48.024Z",
"updatedAt": "2020-02-23T00:42:52.948Z",
"ymlConfigPropertyBag": {
"integrationName": "art",
"integrationAlias": "sourceArtifactory"
},
"systemPropertyBag": {},
"staticPropertyBag": {},
"yml": {
"name": "svc_promoted_build_info_sample",
"type": "BuildInfo",
"configuration": {
"sourceArtifactory": "art",
"buildName": "svc_build",
"buildNumber": 1
}
},
"name": "svc_promoted_build_info_sample",
"pipelineSourceBranch": null,
"projectIntegrationId": 65,
"typeCode": 2018,
"latestResourceVersionId": 2633,
"isDeleted": false,
"deletedAt": null,
"isConsistent": true,
"isInternal": false,
"syntaxVersion": "v1.0",
"nextTriggerTime": null
}
]Response Codes:
200: Success