---
title: "searchRepoCustomRecordLabelsAtBranch"
---

> Documentation Index
> Fetch the complete documentation index at: https://buildrforge.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# searchRepoCustomRecordLabelsAtBranch

Path: Forge API › customRecords

`POST /repos/{repo_id}/branches/{branch}/records/labels`

Name up to 1000 records by id, of any custom models, at the branch's working state, as another repo's reference to them shows them. data holds an entry for each record the caller can read: live holds its model and its label, the value of its primary field, or its model's name and the end of its id when that is empty, and live is null for a record that is deleted. A record the caller can't read, or that never was one, has no entry.

## Path parameters

- `repo_id` (`searchRepoCustomRecordLabelsAtBranch.path.repo_id`; string, required)
  - pattern: `^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `branch` (`searchRepoCustomRecordLabelsAtBranch.path.branch`; string, required)
  - minLength: `1`

## Request body

_Required._

- `record_ids` (`searchRepoCustomRecordLabelsAtBranch.record_ids`; array of string, required)
  - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`

## Example request

```json
{
  "record_ids": [
    "string"
  ]
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url '<base-url>/repos/<repo_id>/branches/<branch>/records/labels' \
  --header 'Content-Type: application/json' \
  --data '
{
  "record_ids": [
    "string"
  ]
}
'
```

### TypeScript

```typescript
const url = '<base-url>/repos/<repo_id>/branches/<branch>/records/labels';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({record_ids: ['string']})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/repos/<repo_id>/branches/<branch>/records/labels"

payload = { "record_ids": ["string"] }
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

ReferencedRecordList

#### Example

```json
{
  "data": [
    {
      "record_id": "string",
      "live": {
        "model_api_name": "string",
        "label": "string"
      }
    }
  ]
}
```

- `data` (`searchRepoCustomRecordLabelsAtBranch.response.200.data`; array of object, required)
  - `record_id` (`searchRepoCustomRecordLabelsAtBranch.response.200.data.record_id`; string, required)
    - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
  - `live` (`searchRepoCustomRecordLabelsAtBranch.response.200.data.live`; any of, required)
    - any of the following:
      - `LiveReferencedRecord`
        - `model_api_name` (`LiveReferencedRecord.model_api_name`; string, required)
          - minLength: `1`
        - `label` (`LiveReferencedRecord.label`; string, required)
          - minLength: `1`
      - `null`

### 400

InvalidRequest | RequestBodyTooDeep

#### Example

```json
{
  "_tag": "InvalidRequest",
  "part": "path",
  "issues": [
    {
      "path": [
        "string"
      ],
      "message": "string"
    }
  ]
}
```

Any of the following:

- `InvalidRequestEncoded`
  - `_tag` (`InvalidRequestEncoded._tag`; string, required)
    - one of `"InvalidRequest"`
  - `part` (`InvalidRequestEncoded.part`; string, required)
    - one of `"path"`, `"query"`, `"headers"`, `"body"`
  - `issues` (`InvalidRequestEncoded.issues`; array of object, required)
    - `path` (`InvalidRequestEncoded.issues.path`; array\<any of\>, required)
      - any of the following: `string`, `integer`
    - `message` (`InvalidRequestEncoded.issues.message`; string, required)
- `RequestBodyTooDeepEncoded`
  - `_tag` (`RequestBodyTooDeepEncoded._tag`; string, required)
    - one of `"RequestBodyTooDeep"`
  - `max_depth` (`RequestBodyTooDeepEncoded.max_depth`; integer, required)
    - maximum: `9007199254740991` · minimum: `-9007199254740991`

### 401

InvalidCredentials

#### Example

```json
{
  "_tag": "InvalidCredentials"
}
```

- `_tag` (`searchRepoCustomRecordLabelsAtBranch.response.401._tag`; string, required)
  - one of `"InvalidCredentials"`

### 403

Forbidden | ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired

#### Example

```json
{
  "_tag": "Forbidden",
  "message": "string"
}
```

Any of the following:

- `ForbiddenEncoded`
  - `_tag` (`ForbiddenEncoded._tag`; string, required)
    - one of `"Forbidden"`
  - `message` (`ForbiddenEncoded.message`; string, required)
- `ForbiddenOriginEncoded`
  - `_tag` (`ForbiddenOriginEncoded._tag`; string, required)
    - one of `"ForbiddenOrigin"`
- `RequiresPersonalSessionEncoded`
  - `_tag` (`RequiresPersonalSessionEncoded._tag`; string, required)
    - one of `"RequiresPersonalSession"`
- `RunBranchRequiredEncoded`
  - `_tag` (`RunBranchRequiredEncoded._tag`; string, required)
    - one of `"RunBranchRequired"`
  - `branch` (`RunBranchRequiredEncoded.branch`; string, required)
    - minLength: `1`
  - `message` (`RunBranchRequiredEncoded.message`; string, required)

### 404

BranchNotFound | RepoNotFound

#### Example

```json
{
  "_tag": "BranchNotFound",
  "branch": "string"
}
```

Any of the following:

- `BranchNotFoundEncoded`
  - `_tag` (`BranchNotFoundEncoded._tag`; string, required)
    - one of `"BranchNotFound"`
  - `branch` (`BranchNotFoundEncoded.branch`; string, required)
    - minLength: `1`
- `RepoNotFoundEncoded`
  - `_tag` (`RepoNotFoundEncoded._tag`; string, required)
    - one of `"RepoNotFound"`

### 413

RequestBodyTooLarge

#### Example

```json
{
  "_tag": "RequestBodyTooLarge",
  "max_bytes": -9007199254740991
}
```

- `_tag` (`searchRepoCustomRecordLabelsAtBranch.response.413._tag`; string, required)
  - one of `"RequestBodyTooLarge"`
- `max_bytes` (`searchRepoCustomRecordLabelsAtBranch.response.413.max_bytes`; integer, required)
  - maximum: `9007199254740991` · minimum: `-9007199254740991`

### 429

RateLimited

#### Example

```json
{
  "_tag": "RateLimited"
}
```

- `_tag` (`searchRepoCustomRecordLabelsAtBranch.response.429._tag`; string, required)
  - one of `"RateLimited"`

### 500

RepoFailure

#### Example

```json
{
  "_tag": "RepoFailure",
  "reason": "string"
}
```

- `_tag` (`searchRepoCustomRecordLabelsAtBranch.response.500._tag`; string, required)
  - one of `"RepoFailure"`
- `reason` (`searchRepoCustomRecordLabelsAtBranch.response.500.reason`; string, required)

### 503

SessionUnavailable | RateLimitUnavailable

#### Example

```json
{
  "_tag": "SessionUnavailable"
}
```

Any of the following:

- `SessionUnavailableEncoded`
  - `_tag` (`SessionUnavailableEncoded._tag`; string, required)
    - one of `"SessionUnavailable"`
- `RateLimitUnavailableEncoded`
  - `_tag` (`RateLimitUnavailableEncoded._tag`; string, required)
    - one of `"RateLimitUnavailable"`


Source: https://buildrforge.com/docs/api/search-repo-custom-record-labels-at-branch/index.md
