openapi: 3.2.0 info: description: Credo AI server API title: Credo AI server Entity Policy Packs API servers: - url: /api/v2/credoai tags: - name: entity_policy_packs paths: /entities/{entity_id}/policy_packs/{id}: delete: description: Delete a policy pack from the specified entity. operationId: CredoAIWeb.API.V2.Entity.PolicyPackController.delete parameters: - description: The ID of the entity. in: path name: entity_id required: true schema: type: string - description: The unique ID of the policy pack to delete. in: path name: id required: true schema: type: string responses: '204': description: No Content '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '403': description: Forbidden content: application/vnd.api+json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: Not Found content: application/vnd.api+json: schema: $ref: '#/components/schemas/NotFoundError' security: - Bearer: [] summary: '' tags: - entity_policy_packs patch: description: Update an existing policy pack. Version upgrade or due date update. operationId: CredoAIWeb.API.V2.Entity.PolicyPackController.update parameters: - description: The ID of the entity. in: path name: entity_id required: true schema: type: string - description: The unique ID of the policy pack to update. in: path name: id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/EntityPolicyPackResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '403': description: Forbidden content: application/vnd.api+json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: Not Found content: application/vnd.api+json: schema: $ref: '#/components/schemas/NotFoundError' security: - Bearer: [] summary: '' tags: - entity_policy_packs requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/EntityPolicyPackUpdateRequest' description: Attributes to update the policy pack. /entities/{entity_id}/policy_packs: get: description: Retrieve a list of all policy packs associated with a specific entity. operationId: CredoAIWeb.API.V2.Entity.PolicyPackController.index parameters: - description: The ID of the entity. in: path name: entity_id required: true schema: type: string responses: '200': description: OK content: application/vnd.api+json: schema: $ref: '#/components/schemas/EntityPolicyPacksResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '404': description: Not Found content: application/vnd.api+json: schema: $ref: '#/components/schemas/NotFoundError' security: - Bearer: [] summary: '' tags: - entity_policy_packs post: description: Create a new policy pack for the specified entity. operationId: CredoAIWeb.API.V2.Entity.PolicyPackController.create parameters: - description: The ID of the entity. in: path name: entity_id required: true schema: type: string responses: '201': description: Created content: application/vnd.api+json: schema: $ref: '#/components/schemas/EntityPolicyPackResponse' '401': description: Unauthorized content: application/vnd.api+json: schema: $ref: '#/components/schemas/AuthError' '403': description: Forbidden content: application/vnd.api+json: schema: $ref: '#/components/schemas/ForbiddenError' '404': description: Not Found content: application/vnd.api+json: schema: $ref: '#/components/schemas/NotFoundError' security: - Bearer: [] summary: '' tags: - entity_policy_packs requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/EntityPolicyPackCreateRequest' description: Attributes for the new policy pack. components: schemas: EntityPolicyPackUpdateRequest: description: '' properties: data: description: '' properties: attributes: properties: due_date: description: due date example: '2024-01-30T17:00:00.000Z' type: string timezone: description: timezone example: Asia/Seoul type: string version: description: policy pack version type: integer type: object id: description: The JSON-API resource ID example: 64YUaLWSviHgibJaRWr3ZE type: string type: description: The JSON-API resource type example: resource-type type: string type: object type: object EntityPolicyPackResource: description: '' properties: attributes: properties: due_date: description: '' type: string entity_id: description: '' type: string inserted_at: description: '' type: string key: description: '' type: string timezone: description: '' type: string updated_at: description: '' type: string version: description: '' type: string type: object id: description: The JSON-API resource ID example: 64YUaLWSviHgibJaRWr3ZE type: string relationships: properties: {} type: object type: description: The JSON-API resource type example: entity_policy_packs type: string type: object AuthError: properties: errors: description: Errors items: properties: code: description: an application-specific error code, expressed as a string value. type: integer detail: description: a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized. type: string title: description: a short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. type: string type: object type: array type: object EntityPolicyPackResponse: description: A JSON-API document with a single [EntityPolicyPackResource](#entitypolicypackresource) resource properties: data: $ref: '#/components/schemas/EntityPolicyPackResource' included: description: Included resources items: properties: id: description: The JSON-API resource ID type: string type: description: The JSON-API resource type type: string type: object type: array required: - data type: object EntityPolicyPackCreateRequest: description: '' properties: data: description: '' properties: attributes: properties: key: description: policy_pack key example: QUES type: string version: description: policy pack version type: integer required: - key - version type: object type: description: The JSON-API resource type example: resource-type type: string type: object type: object EntityPolicyPacksResponse: description: A collection of [EntityPolicyPackResource](#entitypolicypackresource) properties: data: description: Content with [EntityPolicyPackResource](#entitypolicypackresource) objects items: $ref: '#/components/schemas/EntityPolicyPackResource' type: array required: - data type: object ForbiddenError: properties: errors: description: Errors items: properties: code: description: an application-specific error code, expressed as a string value. type: integer detail: description: a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized. type: string title: description: a short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. type: string type: object type: array type: object NotFoundError: properties: errors: description: Errors items: properties: code: description: an application-specific error code, expressed as a string value. type: integer detail: description: a human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized. type: string title: description: a short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization. type: string type: object type: array type: object securitySchemes: Bearer: in: header name: Authorization type: apiKey