> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/software-engineering-insights/use-software-engineering-insights/sei-administration/sei-api-reference/sei-contributors-api.md).

# 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`

{% hint style="info" %}
Note that the Base URL is relative to the application environment that you are using.
{% endhint %}

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

### Get the active version <a href="#get-the-active-version" id="get-the-active-version"></a>

```bash
GET /v1/org/users/versions
```

This API endpoint retrieves the list of active versions.

#### Headers <a href="#headers" id="headers"></a>

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `ApiKey token>`    |

#### Sample Request <a href="#sample-request" id="sample-request"></a>

```bash
curl '<BASE_URL>/v1/org/users/versions?page_size=999' \
  -H 'accept: application/json' \
  -H 'authorization: <See API Usage>'
```

{% tabs %}
{% tab title="200" %}

```json
{
  "records": [521 items],
  "count": 521,
  "_metadata":{
    "page_size": 999,
    "page": 0,
    "has_next": false,
    "total_count": 521
  }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

#### Parameters <a href="#parameters" id="parameters"></a>

| Name                   | Description                                                                        |
| ---------------------- | ---------------------------------------------------------------------------------- |
| `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 <a href="#response-fields" id="response-fields"></a>

| Name          | Description                                                                                         |
| ------------- | --------------------------------------------------------------------------------------------------- |
| `records`     | An array containing the list of active versions. In this example, there are 521 items in the array. |
| `count`       | The number of records on the current page.                                                          |
| `page_size`   | The number of records per page (same as the `page_size` parameter in the request).                  |
| `page`        | The current page number.                                                                            |
| `has_next`    | A boolean value indicating whether there is another page of results.                                |
| `total_count` | The total number of records across all pages.                                                       |

### Schema API to get schema used by current contributor pages and custom fields <a href="#schema-api-to-get-schema-used-by-current-contributor-pages-and-custom-fields" id="schema-api-to-get-schema-used-by-current-contributor-pages-and-custom-fields"></a>

```bash
GET /v1/org/users/schema
```

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

#### Sample Request <a href="#sample-request" id="sample-request"></a>

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

#### Sample Response <a href="#sample-response" id="sample-response"></a>

```json
{
  "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 <a href="#response-fields" id="response-fields"></a>

* 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.
