LibraryArtifact

Use this resource to retrieve information about library artifacts (space, blueprint, process app, decision, and policy) in CSV format. A user can specify which fields to return and optionally filter on which artifacts are returned.

Method summary

HTTP Method Path Description
GET /scr/api/LibraryArtifact Retrieves information about library artifacts (space, blueprint, process app, decision, and policy) in CSV format.

GET /scr/api/LibraryArtifact

Description
Use this method to retrieve information about library artifacts (space, blueprint, process app, decision, and policy) in CSV format. A user can specify which fields to return and optionally filter on which artifacts are returned.
Resource information
Requirements Description
Response format CSV
Requires authentication Yes. Any user except a viewer can use this method.
Supports OAuth 2 client credentials Yes using a User Service ID containing Artifact Reporting Category
Rate limited Not yet
Parameters
Name Location Description Required Type
X-On-Behalf-Of Header The user context. The value must be a username in the account. The user must have permission to perform the action in the account and in the specified parent space, if any. Required if Service ID OAuth credentials are used. Not required when using User Service ID OAuth credential. String
returnFields Query A list of fields to return. Any combination of fields can be specified as comma-separated values. Valid values are * (return all fields), NAME, VERSION_NAME, ID, TYPE, HIERARCHY, SPACE, TAGS, IS_ACTIVE, IS_PUBLISHED, PUBLISHED_DATE, PUBLISHED_NAME, CREATED_DATE, CREATED_BY_USER_NAME, CREATED_BY_USER_ID, CREATED_BY_USER_EMAIL, LAST_MODIFIED_DATE, LAST_MODIFIED_BY_USER_NAME, LAST_MODIFIED_BY_USER_ID, LAST_MODIFIED_BY_USER_EMAIL, LAST_VIEWED_DATE, LAST_VIEWED_BY_USER_NAME, LAST_VIEWED_BY_USER_ID, LAST_VIEWED_BY_USER_EMAIL, ARCHIVED_DATE, ARCHIVED_BY_USER_NAME, ARCHIVED_BY_USER_ID, ARCHIVED_BY_USER_EMAIL. Yes String
activeState Query Filter on the state of the artifact. Valid values are ACTIVE, ARCHIVED. No String
publishedState Query Filter on the published state of the artifact. Valid values are PUBLISHED, UNPUBLISHED. No String
spaceId Query Filter on the space ID. All child artifacts of the space are returned. (The space itself is also returned.) No String
spaceName Query Filter on the space name. All child artifacts of the space are returned. (The space itself is also returned.) No String
topSpaceOnly Query Filter on whether to return only artifacts in top-level spaces. Valid values are true and false. No String
type Query Filter on the type of the artifact. Valid values are SPACE, BLUEPRINT, PROCESS_APP, DECISION, POLICY. No String
Response

The results are returned as CSV data.

Example input
The following example retrieves all active library artifacts of BLUEPRINT type.
  • Using User Service ID OAuth 2 client credentials:
    curl -i -H "Authorization: Bearer access_token" 
        "https://your_server_url/scr/api/LibraryArtifact?returnFields=*&type=SPACE&activeState=ACTIVE"
  • Using Service ID OAuth 2 client credentials:
    curl -i -H "Authorization: Bearer access_token" 
    "https://your_server_url/scr/api/LibraryArtifact?returnFields=*&type=SPACE&activeState=ACTIVE"
  • Using Service ID OAuth 2 client credentials with user context:
    curl -i -H "Authorization: Bearer access_token" 
        -H "X-On-Behalf-Of:user_name@domain.com" "https://your_server_url/scr/api/LibraryArtifact?returnFields=*&type=SPACE&activeState=ACTIVE"
Example output
"Name","Version Name","ID","Type","Hierarchy","Space Name","Tags","Is Active",
"Is Published","Published Date","Published Name","Created Date","Created By User","Created By User ID",
"Created By User Email","Last Modified Date","Last Modified By User","Last Modified By User ID",
"Last Modified By User Email","Last Viewed Date","Last Viewed By User","Last Viewed By User ID",
"Last Viewed By User Email","Archived Date","Archived By User","Archived By User ID","Archived By User Email"
"Hiring - Orientation CD Generation","Hiring - Orientation CD Generation","c009f","Blueprint",
"Process Examples","Process Examples","","true","true","Thu Oct 15 14:00:07 EDT 2020","oct 15 version",
"Mon Jun 01 16:32:09 EDT 2020","Jane Doe","40000","janedoe@domain.com",
"Thu Oct 15 14:00:10 EDT 2020","Jane Doe","40000","janedoe@domain.com",
"Thu Oct 15 15:09:15 EDT 2020","John Doe","40000","johndoe@domain.com","","","",""
Response properties
Name
The name of the artifact in the library. If a named snapshot was published, this value is the name of the artifact at the time that the snapshot was created. Otherwise, it is the current name of the artifact.
Version Name
The current name of the artifact.
ID
The ID of the artifact.
Type
The type of artifact.
Hierarchy
The space hierarchy of the artifact. This value is blank if the artifact is a root space.
Space Name
The name of the space that contains the artifact. This value is blank if the artifact is a root space.
Tags
The tags of the artifact.
Is Active
The active state of the artifact. This value is false if the artifact is archived.
Is Published
The published state of the artifact.
Published Date
If a snapshot of the artifact was published, the date when that snapshot was created. Otherwise, this value is blank.
Published Name
If a snapshot of the artifact was published, the name of that snapshot. Otherwise, this value is blank.
Created Date
The date that the artifact was created.
Created By User
The name of the user who created the artifact.
Created By User ID
The ID of the user who created the artifact.
Created by User Email
The email of the user who created the artifact.
Last Modified Date
The date that the artifact was last modified.
Last Modified By User
The name of the user who most recently modified the artifact.
Last Modified By User ID
The ID of the user who most recently modified the artifact.
Last Modified By User Email
The email of the user who most recently modified the artifact.
Last Viewed Date
The date that the artifact was last viewed.
Last Viewed By User
The name of the user who most recently viewed the artifact.
Last Viewed By User ID
The ID of the user who most recently viewed the artifact.
Last Viewed By User Email
The email of the user who most recently viewed the artifact.
Archived Date
The date that the artifact was archived.
Archived By User
The name of the user who most recently archived the artifact.
Archived By User ID
The ID of the user who most recently archived the artifact.
Archived By User Email
The email of the user who most recently archived the artifact.
Response messages
HTTP code Reason
200

The request was completed successfully.

400

There was an error processing the request. Required parameters were missing or contained invalid values.

401

The user isn't authorized to make the request.