Credentially Placement Roles API
Org-scoped roles a placement can reference (e.g. Band 6 RN).
Org-scoped roles a placement can reference (e.g. Band 6 RN).
openapi: 3.1.0
info:
title: Credentially Public Compliance-packages Placement Roles API
description: Public API Proxy with Rate Limiting and Audit
version: 2.0.0
servers:
- url: https://app.credentially.io/gateway
description: Generated server url
tags:
- name: Placement Roles
description: Org-scoped roles a placement can reference (e.g. Band 6 RN).
paths:
/api/placement-roles/{id}:
get:
tags:
- Placement Roles
summary: Get a placement role by public id
description: '
**Rate Limit:** `delete-placement-role` (25 req / 1s)'
operationId: get_1
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
- name: X-API-Version
in: header
schema:
type: string
default: 2.0.0
enum:
- 2.0.0
responses:
'200':
description: Role found
content:
'*/*':
schema:
$ref: '#/components/schemas/RoleResponse'
'403':
description: Token lacks scope, or role not in caller's organisation
'429':
description: Too many requests - the rate limit for this endpoint has been exceeded. Use the Retry-After header to determine when to retry.
headers:
Retry-After:
description: Number of seconds to wait before retrying the request.
schema:
type: integer
format: int32
example: 1
security:
- bearer-key: []
put:
tags:
- Placement Roles
summary: Update a placement role
description: '
**Rate Limit:** `delete-placement-role` (25 req / 1s)'
operationId: update_2
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
- name: X-API-Version
in: header
schema:
type: string
default: 2.0.0
enum:
- 2.0.0
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RoleRequest'
required: true
responses:
'200':
description: Role updated
content:
'*/*':
schema:
$ref: '#/components/schemas/RoleResponse'
'400':
description: Validation failed
'403':
description: Token lacks scope, or role not in caller's organisation
'409':
description: A role with the new name already exists
'429':
description: Too many requests - the rate limit for this endpoint has been exceeded. Use the Retry-After header to determine when to retry.
headers:
Retry-After:
description: Number of seconds to wait before retrying the request.
schema:
type: integer
format: int32
example: 1
security:
- bearer-key: []
delete:
tags:
- Placement Roles
summary: Delete a placement role
description: '
**Rate Limit:** `delete-placement-role` (25 req / 1s)'
operationId: delete_1
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
- name: X-API-Version
in: header
schema:
type: string
default: 2.0.0
enum:
- 2.0.0
responses:
'204':
description: Role deleted
'403':
description: Token lacks scope, or role not in caller's organisation
'429':
description: Too many requests - the rate limit for this endpoint has been exceeded. Use the Retry-After header to determine when to retry.
headers:
Retry-After:
description: Number of seconds to wait before retrying the request.
schema:
type: integer
format: int32
example: 1
security:
- bearer-key: []
/api/placement-roles:
get:
tags:
- Placement Roles
summary: List placement roles
description: '
**Rate Limit:** `create-placement-role` (25 req / 1s)'
operationId: list_1
parameters:
- name: X-API-Version
in: header
schema:
type: string
default: 2.0.0
enum:
- 2.0.0
responses:
'200':
description: Roles retrieved
content:
'*/*':
schema:
type: array
items:
$ref: '#/components/schemas/RoleResponse'
'401':
description: Missing or invalid bearer token
'403':
description: Token lacks required scope
'429':
description: Too many requests - the rate limit for this endpoint has been exceeded. Use the Retry-After header to determine when to retry.
headers:
Retry-After:
description: Number of seconds to wait before retrying the request.
schema:
type: integer
format: int32
example: 1
security:
- bearer-key: []
post:
tags:
- Placement Roles
summary: Create a placement role
description: '
**Rate Limit:** `create-placement-role` (25 req / 1s)'
operationId: create_1
parameters:
- name: X-API-Version
in: header
schema:
type: string
default: 2.0.0
enum:
- 2.0.0
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RoleRequest'
required: true
responses:
'201':
description: Role created
content:
'*/*':
schema:
$ref: '#/components/schemas/RoleResponse'
'400':
description: Validation failed
'409':
description: A role with that name already exists
'429':
description: Too many requests - the rate limit for this endpoint has been exceeded. Use the Retry-After header to determine when to retry.
headers:
Retry-After:
description: Number of seconds to wait before retrying the request.
schema:
type: integer
format: int32
example: 1
security:
- bearer-key: []
components:
schemas:
RoleRequest:
type: object
properties:
name:
type: string
maxLength: 128
minLength: 0
description:
type: string
maxLength: 256
minLength: 0
required:
- name
RoleResponse:
type: object
properties:
publicId:
type: string
format: uuid
name:
type: string
description:
type: string
createdAt:
type: string
format: date-time
createdBy:
type: string
format: uuid
updatedAt:
type: string
format: date-time
updatedBy:
type: string
format: uuid
securitySchemes:
bearer-key:
type: http
scheme: bearer
bearerFormat: JWT