Get Resources

JFrog REST APIs

Products
JFrog Xray
Content Type
REST API
ft:sourceType
Paligo

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

pipelineSourceIds

string

Optional. Comma-separated list of pipelineSource ids

resourceIds

string

Optional. Comma-separated list of resource ids

projectIds

string

Optional. Comma-separated list of project ids

names

string

Optional. Comma-separated list of resource names

typeCodes

string

Optional. Comma-separated list of resource type codes

pipelineSourceBranches

string

Optional. Comma-separated list of pipeline source branches

isDeleted

boolean

Optional. Default is false. Filters based on the isDeleted property of the resource

deletedBefore

string($date-time)

Optional. Filters for resources where deletedAt property is less than deletedBefore

isConsistent

boolean

Optional. Default is false. Filter based on the isConsistent property of the resource

isInternal

boolean

Optional. Default is false. Filter based on the isInternal property of the resource

projectIntegrationIds

string

Optional. Comma-separated list of project integration IDs

createdBefore

string($date-time)

Optional. Runs created before the date

createdAfter

string($date-time)

Optional. Runs created after the date

nextTriggerTimeBefore

string($date-time)

Optional. Runs triggered before the date

sortBy

string

Optional. Comma-separated list of sort attributes

sortOrder

integer

Optional. 1 for ascending and -1 for descending based on sortBy

limit

integer

Optional. A limit on the number of resources returned.

skip

integer

Optional. A cursor for use in pagination. skip defines the number of resources skipped.

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