# personalitySelfView

Source: /openapi/thomas-federated.openapi.json

## Operation

| Method | URL |
|---|---|
| GET | https://api.thomas.co/v1/personality/self-view |

| Field | Value |
|---|---|
| operationId | personalitySelfView |
| method | GET |
| server | https://api.thomas.co |
| path | /v1/personality/self-view |
| tags | `Personality` |
| summary | Project the acting person's own personality self-view (signed in, or a Partner on their behalf). |
| badges | None |
| scopes | `results:r` |

## Description

Through a Partner acting on behalf of the person, the self-view is the person's own newest result, exactly as the person sees it signed in. The selected tenant must hold the Professional plan (INSUFFICIENT_TIER otherwise).

## Request Parameters

| Name | In | Required | Schema | Description |
|---|---|---|---|---|
| Thomas-On-Behalf-Of | header | true | string | Sent only by a Partner API client, to act as one named person: thomas:<companyIndividualId> or partner:<partnerReference>. A Partner must send it on this operation (without it the call is refused with 403 PRINCIPAL_TYPE_NOT_ALLOWED); a signed-in person never sends it. |
| Thomas-Tenant-Id | header | true | string:uuid | Required for API clients: the Tenant this call acts in. Send exactly one. Signed-in users don't send it — their Tenant comes from their session. The header only selects the Tenant; your Grant for it decides access, and is checked on every call. |

## Request Body

None.

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 200 | The acting person's own self-view content. | #/components/schemas/PersonalitySelfViewResponseDto |
| 400 | A malformed tenant or person selector. Also returned when the Thomas-On-Behalf-Of header is repeated or malformed. | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 403 | A Partner is refused when its Grant does not carry results:r for the selected tenant, when it calls as the API client itself rather than on behalf of a named person, or when the selected tenant does not hold the Professional plan. Also returned when a Partner API client calls without Thomas-On-Behalf-Of. | #/components/schemas/ApiErrorResponseDto |
| 404 | The subject has no committed personality result to project, or the named acting person is unavailable. Also returned when the person named in Thomas-On-Behalf-Of is unavailable. | #/components/schemas/ApiErrorResponseDto |
| 429 | Rate limit exceeded. | #/components/schemas/ApiErrorResponseDto |

### Response 429 headers

| Name | Description | Schema |
|---|---|---|
| Retry-After | Seconds until the rate-limit block expires before retrying. | {"type":"integer","minimum":0} |
| RateLimit-Limit | Configured request limit for the active rate-limit window. | {"type":"integer"} |
| RateLimit-Remaining | Requests remaining in the active rate-limit window; zero when blocked. | {"type":"integer"} |
| RateLimit-Reset | Seconds until the rate-limit block expires. | {"type":"integer","minimum":0} |

## Artifact Examples

### Response 400 example — AUTH_TENANT_CONTEXT_INVALID (Malformed person selector)

```json
{
  "statusCode": 400,
  "message": "Exactly one valid Thomas-On-Behalf-Of header is required",
  "error": "AUTH_TENANT_CONTEXT_INVALID"
}
```

### Response 400 example — AUTH_TENANT_CONTEXT_INVALID (Missing or malformed tenant selector)

```json
{
  "statusCode": 400,
  "message": "Exactly one valid Thomas-Tenant-Id header is required",
  "error": "AUTH_TENANT_CONTEXT_INVALID"
}
```

### Response 401 example

```json
{
  "statusCode": 401,
  "message": "Invalid or missing authentication token",
  "error": "AUTH_TOKEN_INVALID"
}
```

### Response 403 example — AUTH_TENANT_NOT_GRANTED

```json
{
  "statusCode": 403,
  "message": "API client is not granted access to this tenant",
  "error": "AUTH_TENANT_NOT_GRANTED"
}
```

### Response 403 example — PRINCIPAL_TYPE_NOT_ALLOWED (Principal kind not allowed)

```json
{
  "statusCode": 403,
  "message": "On-behalf access is not permitted for this operation",
  "error": "PRINCIPAL_TYPE_NOT_ALLOWED"
}
```

### Response 403 example — INSUFFICIENT_TIER

```json
{
  "statusCode": 403,
  "message": "All instruments requires the Professional plan.",
  "error": "INSUFFICIENT_TIER"
}
```

### Response 403 example — PRINCIPAL_TYPE_NOT_ALLOWED (Named person required)

```json
{
  "statusCode": 403,
  "message": "API client is not permitted to call this operation",
  "error": "PRINCIPAL_TYPE_NOT_ALLOWED"
}
```

### Response 404 example — PERSONALITY_SELF_VIEW_NOT_FOUND

```json
{
  "statusCode": 404,
  "message": "No committed personality result; cannot project a self-view.",
  "error": "PERSONALITY_SELF_VIEW_NOT_FOUND"
}
```

### Response 404 example — AUTH_ON_BEHALF_PERSON_NOT_AVAILABLE

```json
{
  "statusCode": 404,
  "message": "The named person is not available for this operation",
  "error": "AUTH_ON_BEHALF_PERSON_NOT_AVAILABLE"
}
```

### Response 429 example

```json
{
  "statusCode": 429,
  "message": "ThrottlerException: Too Many Requests",
  "error": "HTTP_TOO_MANY_REQUESTS"
}
```
