Skip to main content

Contributors API

Use this API endpoints to access and modify Contributors.

  • Base URL (PROD2): https://app.harness.io/gratis/sei/api/v1/custom-cicd
  • Base URL (PROD1): https://app.harness.io/prod1/sei/api/v1/custom-cicd
info

Note that the Base URL is relative to the application environment that you are using.

  • Header: Requires Bearer token key authorization. The content type is application/json

Get the active version

GET /v1/org/users/versions

This API endpoint retrieves the list of active versions.

Headers

NameValue
Content-Typeapplication/json
AuthorizationApiKey token>

Sample Request

curl '<BASE_URL>/v1/org/users/versions?page_size=999' \
-H 'accept: application/json' \
-H 'authorization: <See API Usage>'
{
"records": [521 items],
"count": 521,
"_metadata":{
"page_size": 999,
"page": 0,
"has_next": false,
"total_count": 521
}
}

Parameters

NameDescription
page_size (optional)The number of records to return per page. In the sample request, it is set to 999.
page (optional)The page number to retrieve. If not provided, it defaults to 0 (the first page).

Response Fields

NameDescription
recordsAn array containing the list of active versions. In this example, there are 521 items in the array.
countThe number of records on the current page.
page_sizeThe number of records per page (same as the page_size parameter in the request).
pageThe current page number.
has_nextA boolean value indicating whether there is another page of results.
total_countThe total number of records across all pages.

Schema API to get schema used by current contributor pages and custom fields

GET /v1/org/users/schema

This API endpoint retrieves the schema used by the current contributor pages, including any custom fields.

Sample Request

curl '${BASE_URL}/v1/org/users/schema' \
-H 'accept: application/json' \
-H 'authorization: <See API Usage>'

Sample Response

{
"version": 190,
"created_at": 1710153327501,
"fields": [
{
"index": 3,
"key": "integration",
"display_name": "Integration",
"description": "Add a column for every integration",
"type": "string",
"system_field": false
},
{
"index": 1,
"key": "full_name",
"display_name": "Name",
"description": "Name",
"type": "string",
"system_field": false
},
{
"index": 2,
"key": "region",
"display_name": "Region",
"description": "Region",
"type": "string",
"system_field": false
},
{
"index": 2,
"key": "email",
"display_name": "Email",
"description": "Unique email address per member",
"type": "string",
"system_field": false
}
]
}

Response Fields

  • version: The version of the schema.
  • created_at: The timestamp when the schema was created (in milliseconds).
  • fields: An array of objects representing the fields in the schema. Each field object has the following properties:
    • index: The index of the field.
    • key: The unique key for the field.
    • display_name: The display name for the field.
    • description: The description of the field.
    • type: The data type of the field (e.g., string).
    • system_field: A boolean indicating whether the field is a system field or a custom field.