diff --git a/code/API_definitions/brand-registration.yaml b/code/API_definitions/brand-registration.yaml index da3974d..1b7cec1 100644 --- a/code/API_definitions/brand-registration.yaml +++ b/code/API_definitions/brand-registration.yaml @@ -84,21 +84,21 @@ servers: default: http://localhost:9091 description: API root, defined by the service provider, e.g. `api.example.com` or `api.example.com/somepath` tags: - - name: Create Brand registration + - name: Create Brand Registration description: Create Brand Registration Information for a Calling Party - - name: Update Brand registration + - name: Update Brand Registration description: Update Existing Brand Registration Information for a Calling Party - - name: Read Brand registration + - name: Read Brand Registration description: Read Existing Brand Registration Information for a Calling Party - - name: Delete Brand registration + - name: Delete Brand Registration description: Delete Existing Brand Registration Information for a Calling Party - - name: Call branded notifications callback + - name: Call Branded Notifications Callback description: Notifications callback invoked by the API provider when a call is successfully branded for a registration that opted in with `sink`. paths: /registrations: post: tags: - - Create Brand registration + - Create Brand Registration summary: Register new brand information in the service platform description: Register new brand information with optional call verification request. operationId: createRegistration @@ -177,7 +177,7 @@ paths: "{$request.body#/sink}": post: tags: - - Call branded notifications callback + - Call Branded Notifications Callback summary: Call branded notifications callback description: | Important: this endpoint is to be implemented by the API consumer. @@ -197,6 +197,11 @@ paths: $ref: '#/components/examples/CALL_BRANDED_EVENT' BRAND_REGISTRATION_STATUS_EVENT: $ref: '#/components/examples/BRAND_REGISTRATION_STATUS_EVENT' + QUOTA_EXHAUSTED_EVENT: + $ref: '#/components/examples/QUOTA_EXHAUSTED_EVENT' + QUOTA_THRESHOLD_REACHED_EVENT: + $ref: '#/components/examples/QUOTA_THRESHOLD_REACHED_EVENT' + responses: '204': description: Successful notification @@ -244,7 +249,7 @@ paths: - brand-registration:create get: tags: - - Read Brand registration + - Read Brand Registration summary: Read existing brand registrations from the service platform description: | Read existing brand registrations from the service platform. @@ -320,7 +325,7 @@ paths: /registrations/{registrationId}: get: tags: - - Read Brand registration + - Read Brand Registration summary: Read an existing brand registration from the service platform description: Read an existing brand registration from the service platform operationId: readRegistration @@ -356,7 +361,7 @@ paths: - brand-registration:read delete: tags: - - Delete Brand registration + - Delete Brand Registration summary: Delete an existing brand registration from the service platform description: Delete an existing brand registration from the service platform operationId: deleteRegistration @@ -392,7 +397,7 @@ paths: - brand-registration:delete put: tags: - - Update Brand registration + - Update Brand Registration summary: Update an existing brand registration in the service platform description: Update an existing brand registration operationId: updateRegistration @@ -723,7 +728,7 @@ components: Omit this field (and `sinkCredential`) to create the registration without event notifications. example: "https://endpoint.example.com/sink" sinkCredential: - $ref: '#/components/schemas/SinkCredential' + $ref: '../common/CAMARA_event_common.yaml#/components/schemas/SinkCredential' RegistrationRecord: type: object @@ -932,75 +937,6 @@ components: quota: $ref: '#/components/schemas/Quota' - Source: - type: string - format: uri-reference - minLength: 1 - maxLength: 2048 - description: | - Identifies the context in which the event happened. For Brand Registration - events, this MUST be the URL of the brand-registrations collection of the - API provider, in the format - `{apiRoot}/brand-registration/{version}/registrations`. - The specific `registrationId` the event pertains to is carried in `data.registrationId`. - example: "https://service-provider.com/brand-registration/v0/registrations" - - SinkCredential: - type: object - description: A sink credential provides authentication or authorization information necessary to enable delivery of events to a target. - properties: - credentialType: - type: string - enum: - - ACCESSTOKEN - - PRIVATE_KEY_JWT - description: The type of the credential - MUST be set to ACCESSTOKEN or PRIVATE_KEY_JWT. - discriminator: - propertyName: credentialType - mapping: - ACCESSTOKEN: '#/components/schemas/AccessTokenCredential' - PRIVATE_KEY_JWT: '#/components/schemas/PrivateKeyJWTCredential' - required: - - credentialType - - AccessTokenCredential: - type: object - description: An access token credential. This type of credential is meant to be used by API Consumers that have limited capabilities to handle authorization requests. - allOf: - - $ref: '#/components/schemas/SinkCredential' - - type: object - properties: - accessToken: - type: string - maxLength: 4096 - description: REQUIRED. An access token granting access to the target resource. - accessTokenExpiresUtc: - type: string - format: date-time - maxLength: 64 - description: | - REQUIRED. An absolute (UTC) timestamp at which the token shall be considered expired. - It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have a time zone. - example: "2026-07-03T12:27:08.312Z" - accessTokenType: - type: string - enum: - - bearer - description: REQUIRED. Type of the access token (See [OAuth 2.0](https://tools.ietf.org/html/rfc6749#section-7.1)). - required: - - accessToken - - accessTokenExpiresUtc - - accessTokenType - - PrivateKeyJWTCredential: - type: object - description: | - Use PRIVATE_KEY_JWT to obtain an access token. The authorization server information needed - for this type of sink credential (token endpoint, client ID, JWKS URL) is shared upfront - between the client and the CAMARA entity. - allOf: - - $ref: '#/components/schemas/SinkCredential' - responses: SuccessfulRecord: description: Success response with a brand registration record @@ -1140,64 +1076,6 @@ components: perPage: 20 totalCount: 2 totalPages: 1 - Generic400: - description: Bad Request - headers: - x-correlator: - $ref: "../common/CAMARA_common.yaml#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 400 - code: - enum: - - INVALID_ARGUMENT - - INVALID_PROTOCOL - - INVALID_CREDENTIAL - - INVALID_TOKEN - - INVALID_SINK - examples: - GENERIC_400_INVALID_ARGUMENT: - summary: Invalid argument - description: Invalid Argument. Generic Syntax Exception - value: - status: 400 - code: INVALID_ARGUMENT - message: Client specified an invalid argument, request body or query param. - GENERIC_400_INVALID_PROTOCOL: - summary: Invalid protocol - description: Invalid protocol for event notifications - value: - status: 400 - code: INVALID_PROTOCOL - message: Only HTTPS is supported for notification delivery. - GENERIC_400_INVALID_CREDENTIAL: - summary: Invalid credential - description: Invalid sink credential type - value: - status: 400 - code: INVALID_CREDENTIAL - message: Only ACCESSTOKEN or PRIVATE_KEY_JWT credential types are supported. - GENERIC_400_INVALID_TOKEN: - summary: Invalid token - description: The access token provided in sinkCredential is invalid - value: - status: 400 - code: INVALID_TOKEN - message: The access token provided in sinkCredential is not valid. - GENERIC_400_INVALID_SINK: - summary: Invalid sink - description: The sink URL is invalid for the specified protocol - value: - status: 400 - code: INVALID_SINK - message: The sink URL is not valid for the specified protocol. Create404: description: Not found