﻿---
name: dual-admin
description: >
  Instructs AI agents how to query pending dual-approval change requests in
  Kyriba. Read-only API that exposes entities with changes awaiting a second
  administrator's approval.
version: 1.0.0
scopes:
  - dual-admin-scope
authors:
  - kyriba
tags:
  - kyriba
  - platform
  - governance
  - api
---

> **Auth** — POST {AUTH_BASE_URL}/oauth/token · Basic base64(CLIENT_ID:CLIENT_SECRET) · no scope.
> Use token_type verbatim — do not hardcode `Bearer`. On 401: retry once with the other scheme (`token` vs `Bearer`). On 429: wait Kyriba-Customer-Rate-Limit-Reset.

# Kyriba API Skill: Dual Admin

---

## Required Kyriba Permission

```
dual-admin-scope
```

This is a Kyriba access permission — not an OAuth scope parameter. Do NOT add `scope=` to the token request.

---

## What is Dual Admin?

Read-only API that lists entities currently pending a second administrator's approval before their changes take effect. Approving or rejecting is done in the Kyriba UI - not via API.

---

## Base URL

```
https://api.demo.kyriba.com/api/platform/referential/dual-admin/v1
```

---

## Endpoints

| Method | Path | Description |
|--------|------|-------------|
| `GET` | `/api/platform/referential/dual-admin/v1/change-requests/{entityType}` | List pending change requests |
| `GET` | `/api/platform/referential/dual-admin/v1/change-requests/documented-fields` | List documented field names |
| `GET` | `/api/platform/referential/dual-admin/v1/change-requests/documented-fields/{field}` | Get enum values (entityType, status) |
| `GET` | `/api/platform/referential/dual-admin/v1/change-requests/searchable-fields` | List filterable fields |

---

## `entityType` Values

Currently documented: **`THIRDPARTY`**

> Always call `GET /change-requests/documented-fields/entityType` for the authoritative list.

---

## Pagination

Uses flat `offset` / `limit` - **NOT** `page.offset` / `page.limit`.

---

## Filterable Fields

```
uuid, code, status
```

---

## Example Requests

**List all third parties with pending change requests:**
```
GET /api/platform/referential/dual-admin/v1/change-requests/THIRDPARTY?offset=0&limit=100
```

**GET list response:**
```json
{
  "metadata": {
    "pageLimit": 100,
    "pageOffset": 0,
    "pageResults": 2,
    "numberOfTotalResults": 2
  },
  "results": [ ... ]
}
```
> Response key is always `results`. Stop paginating when `len(results) < pageLimit`.

**Filter by status:**
```
GET /api/platform/referential/dual-admin/v1/change-requests/THIRDPARTY?filter=status==PENDING
```

**Get valid status values:**
```
GET /api/platform/referential/dual-admin/v1/change-requests/documented-fields/status
```

---

## Key Response Fields

| Field | Description |
|---|---|
| `uuid` | UUID of the entity with a pending change request |
| `code` | Code of the entity |
| `status` | Change request status - use `/documented-fields/status` for valid values |

---

## Critical Rules

1. Call `GET /change-requests/documented-fields/entityType` before hardcoding entity types
2. Empty list = no pending changes (not an error)
3. Approval/rejection is UI-only - no POST/PUT/DELETE

---

## Error Reference

| Status | Meaning |
|---|---|
| `200` | Success |
| `400` | Invalid filter |
| `403` | Required Kyriba permission not configured on your API client |
| `404` | Entity type not found |

---

## OpenAPI Spec

- OpenAPI: `https://developer.kyriba.com/static/apis/dual-admin/dual-admin.yaml`