Files
api-specs/idn/beta/paths/entitlement.yaml
GitHub Action Bot 9269e86172 Automated commit 'added new oauth2 flow and description (#1386)
* added new oauth2 flow and description

* renamed authentication to make more sense' by github action: 5967546682
2023-08-24 18:29:03 +00:00

43 lines
1.2 KiB
YAML

post:
operationId: createEntitlement
tags:
- Entitlements
summary: Creates an entitlement
description: >-
This internal endpoint creates an entitlement using the given entitlement payload
security:
- UserContextAuth: [idn:entitlement:manage]
requestBody:
required: true
content:
application/json:
schema:
$ref: '../schemas/gov-entitlement/EntitlementDTO.yaml'
responses:
'201':
description: Returns the created entitlement DTO object.
content:
application/json:
schema:
type: array
items:
$ref: '../schemas/gov-entitlement/EntitlementDTO.yaml'
'400':
description: |
* Source is missing
* Source schema is missing
* Entitlement value is missing and source schema object type is not of the permission type
* Attribute is missing
content:
application/json:
schema:
$ref: '../../v3/schemas/ErrorResponseDto.yaml'
'401':
$ref: '../../v3/responses/401.yaml'
'403':
$ref: '../../v3/responses/403.yaml'
'429':
$ref: '../../v3/responses/429.yaml'
'500':
$ref: '../../v3/responses/500.yaml'