openapi: 3.1.0 info: title: Idp core API description: API dedicated to idp core functionalities version: v1 servers: - url: http://localhost:8084 security: - clientId: [] - bearer: [] tags: - name: Entities Management description: Operations related to entity management - name: Entities Templates Management description: Operations related to entity template management paths: /api/v1/entity-templates/{identifier}: get: tags: - Entities Templates Management summary: Get template by identifier description: Retrieve a specific template using its string identifier operationId: getTemplateByIdentifier parameters: - name: identifier in: path required: true schema: type: string responses: '200': description: Template found content: '*/*': schema: $ref: '#/components/schemas/EntityTemplateDtoOut' '404': description: Template not found with the provided identifier content: '*/*': schema: $ref: '#/components/schemas/ErrorResponse' put: tags: - Entities Templates Management summary: Update an existing template by template identifier description: Update the details of an existing template identified by its unique string identifier operationId: updateTemplate parameters: - name: identifier in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EntityTemplateUpdateDtoIn' responses: '200': description: Template update successfully content: '*/*': schema: $ref: '#/components/schemas/EntityTemplateDtoOut' '404': description: Template not found with the provided identifier content: '*/*': schema: $ref: '#/components/schemas/ErrorResponse' delete: tags: - Entities Templates Management summary: Delete template by identifier description: Remove a template from the system using its unique identifier operationId: deleteTemplate parameters: - name: identifier in: path required: true schema: type: string responses: '204': description: Template deleted successfully '404': description: Template not found with the provided identifier content: '*/*': schema: $ref: '#/components/schemas/ErrorResponse' /api/v1/entity-templates: get: tags: - Entities Templates Management summary: Get paginated templates description: Retrieve a paginated list of templates with optional sorting operationId: getTemplatesPaginated parameters: - name: page in: query description: Page number for pagination. Defaults to 0. content: '*/*': schema: type: integer default: '0' - name: size in: query description: Number of items per page. Defaults to 20. content: '*/*': schema: type: integer default: '20' - name: sort in: query description: 'Sorting criteria in the format: property(,asc|desc). Defaults to identifier,asc.' content: '*/*': schema: type: string default: identifier,asc responses: '200': description: Paginated templates retrieved successfully content: '*/*': schema: $ref: '#/components/schemas/TemplatePageResponse' '400': description: Invalid pagination parameters content: '*/*': schema: $ref: '#/components/schemas/ErrorResponse' post: tags: - Entities Templates Management summary: Create a new template description: Create a new template in the system with the provided information operationId: createTemplate requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EntityTemplateCreateDtoIn' responses: '201': description: Template created successfully content: '*/*': schema: $ref: '#/components/schemas/EntityTemplateDtoOut' '400': description: Invalid template data provided content: '*/*': schema: $ref: '#/components/schemas/ErrorResponse' /api/v1/entities/{templateIdentifier}: get: tags: - Entities Management summary: Get entities by template identifier description: Retrieve a paginated list of entities with optional sorting operationId: getEntities parameters: - name: page in: query required: false description: Page number for pagination. Defaults to 0. content: '*/*': schema: type: integer default: '0' - name: size in: query required: false description: Number of items per page. Defaults to 20. content: '*/*': schema: type: integer default: '20' - name: templateIdentifier in: path required: true schema: type: string - name: sort in: query description: 'Sorting criteria in the format: property(,asc|desc). Defaults to identifier,asc.' content: '*/*': schema: type: string default: identifier,asc responses: '200': description: Paginated entities retrieved successfully content: '*/*': schema: $ref: '#/components/schemas/EntityPageResponse' '400': description: Invalid pagination parameters content: '*/*': schema: $ref: '#/components/schemas/ErrorResponse' post: tags: - Entities Management summary: Create a new entity description: Create a new entity in the system with the provided information operationId: createEntity parameters: - in: path name: templateIdentifier required: true schema: minLength: 1 type: string requestBody: content: application/json: schema: "$ref": "#/components/schemas/EntityDtoIn" required: true responses: '201': content: "*/*": schema: "$ref": "#/components/schemas/EntityDtoOut" description: Entity created successfully '400': content: "*/*": schema: "$ref": "#/components/schemas/ErrorResponse" description: Invalid entity data provided '401': description: Unauthorized - Missing or invalid token '403': description: Insufficient rights '404': content: "*/*": schema: "$ref": "#/components/schemas/ErrorResponse" description: Template not found with the provided identifier '409': content: "*/*": schema: "$ref": "#/components/schemas/ErrorResponse" description: Entity already exists in this template '500': content: "*/*": schema: "$ref": "#/components/schemas/ErrorResponse" description: Unexpected server-side failure /api/v1/entities/{templateIdentifier}/{entityIdentifier}: get: tags: - Entities Management summary: Get entity by entity template and identifier description: Retrieve a specific entity using its string identifier and its template identifier operationId: getEntity parameters: - name: templateIdentifier in: path required: true schema: type: string - name: entityIdentifier in: path required: true schema: type: string responses: '200': description: Entity found content: '*/*': schema: $ref: '#/components/schemas/EntityDtoOut' '404': description: Entity not found with the provided identifier content: '*/*': schema: $ref: '#/components/schemas/ErrorResponse' components: schemas: EntityTemplateUpdateDtoIn: type: object description: Input DTO for updating an entity template properties: name: type: string description: Unique Entity Template name example: Service maxLength: 255 minLength: 1 pattern: ^[a-zA-Z0-9 _-]+$ description: type: string description: Entity Template description example: A comprehensive service template properties_definitions: type: array description: List of property definitions for this template items: $ref: '#/components/schemas/PropertyDefinitionDtoIn' relations_definitions: type: array description: List of relation definitions for this template items: $ref: '#/components/schemas/RelationDefinitionDtoIn' required: - name PropertyDefinitionDtoIn: type: object description: Input DTO for creating or updating a property definition properties: name: type: string description: Property name example: applicationName minLength: 1 description: type: string description: Property description example: Name of the application minLength: 1 type: type: string description: Property data type enum: - STRING - NUMBER - BOOLEAN example: STRING required: type: boolean description: Whether this property is required example: true default: false rules: $ref: '#/components/schemas/PropertyRulesDtoIn' description: Property validation rules required: - description - name - type PropertyRulesDtoIn: type: object description: Input DTO for creating or updating a property definition properties: format: type: string description: Property format validation enum: - URL - EMAIL example: EMAIL enum_values: type: array description: Enumeration values for enum properties example: - ACTIVE - INACTIVE items: type: string regex: type: string description: Regular expression pattern for validation example: ^[a-zA-Z0-9]+$ max_length: type: integer format: int32 description: Maximum length for string properties example: 255 min_length: type: integer format: int32 description: Minimum length for string properties example: 1 max_value: type: integer format: int32 description: Maximum value for numeric properties example: 100 min_value: type: integer format: int32 description: Minimum value for numeric properties example: 0 RelationDefinitionDtoIn: type: object description: Input DTO for creating or updating a relation definition properties: name: type: string description: Name of the relation example: dependencies minLength: 1 target_template_identifier: type: string description: Identifier of the target template example: service minLength: 1 required: type: boolean description: Whether this relation is required example: false default: false to_many: type: boolean description: Whether this relation can have multiple targets example: true default: false required: - name - target_template_identifier EntityTemplateDtoOut: type: object description: Output for entity template properties: identifier: type: string description: Unique Entity Template identifier example: service name: type: string description: Unique Entity Template name example: Service description: type: string description: Entity Template description example: A comprehensive service template properties_definitions: type: array description: List of property definitions for this template items: $ref: '#/components/schemas/PropertyDefinitionDtoOut' relations_definitions: type: array description: List of relation definitions for this template items: $ref: '#/components/schemas/RelationDefinitionDtoOut' PropertyDefinitionDtoOut: type: object description: Output DTO for property definition properties: name: type: string description: Property name example: applicationName description: type: string description: Property description example: Name of the application type: type: string description: Property data type enum: - STRING - NUMBER - BOOLEAN example: STRING required: type: boolean description: Whether this property is required example: true rules: $ref: '#/components/schemas/PropertyRulesDtoOut' description: Property validation rules example: Property validation rules PropertyRulesDtoOut: type: object description: Output DTO for property validation rules properties: format: type: string description: Format of the property enum: - URL - EMAIL example: STRING enum_values: type: array description: Allowed enum values for the property example: - VALUE1 - VALUE2 items: type: string regex: type: string description: Regular expression for property validation example: ^[A-Za-z0-9]+$ max_length: type: integer format: int32 description: Maximum length of the property example: 255 min_length: type: integer format: int32 description: Minimum length of the property example: 1 max_value: type: integer format: int32 description: Maximum value for the property example: 100 min_value: type: integer format: int32 description: Minimum value for the property example: 0 RelationDefinitionDtoOut: type: object description: Output DTO for relation definition properties: name: type: string description: Name of the relation example: dependencies target_template_identifier: type: string description: Identifier of the target template example: component-template required: type: boolean description: Whether this relation is required example: false to_many: type: boolean description: Whether this relation can have multiple targets example: true ErrorResponse: type: object properties: error: type: string errorDescription: type: string EntityTemplateCreateDtoIn: type: object description: Input DTO for creating an entity template properties: identifier: type: string description: Unique Entity Template identifier example: service minLength: 1 name: type: string description: Unique Entity Template name example: Service maxLength: 255 minLength: 0 pattern: ^[a-zA-Z0-9 _-]+$ description: type: string description: Entity Template description example: A comprehensive service template properties_definitions: type: array description: List of property definitions for this template items: $ref: '#/components/schemas/PropertyDefinitionDtoIn' relations_definitions: type: array description: List of relation definitions for this template items: $ref: '#/components/schemas/RelationDefinitionDtoIn' required: - identifier - name EntityDtoIn: type: object description: Input DTO for creating or updating an entity properties: name: type: string description: Name of the entity example: my-web-service minLength: 1 identifier: type: string description: Unique identifier of the entity within the template scope example: my-web-service minLength: 1 properties: type: object additionalProperties: type: string description: Map of property name to value for this entity example: port: '8080' environment: dev relations: type: array description: List of relations for this entity items: $ref: '#/components/schemas/RelationDtoIn' required: - identifier - name RelationDtoIn: type: object description: Input DTO for an entity relation instance properties: name: type: string description: Name of the relation (must match a template relation definition) example: depends-on minLength: 1 target_entity_identifiers: type: array description: List of target entity identifiers for this relation example: - web-api-1 - web-api-2 items: type: string required: - name - target_entity_identifiers EntityDtoOut: type: object properties: template_identifier: type: string name: type: string identifier: type: string properties: type: object additionalProperties: {} relations: type: object additionalProperties: type: array items: $ref: '#/components/schemas/EntitySummaryDto' relations_as_target: type: object additionalProperties: type: array items: $ref: '#/components/schemas/EntitySummaryDto' EntitySummaryDto: type: object properties: identifier: type: string name: type: string PageableObject: type: object properties: offset: type: integer format: int64 paged: type: boolean pageNumber: type: integer format: int32 pageSize: type: integer format: int32 sort: $ref: '#/components/schemas/SortObject' unpaged: type: boolean SortObject: type: object properties: empty: type: boolean sorted: type: boolean unsorted: type: boolean TemplatePageResponse: type: object description: Paginated response containing Template objects properties: content: type: array items: $ref: '#/components/schemas/EntityTemplateDtoOut' pageable: $ref: '#/components/schemas/PageableObject' totalElements: type: integer format: int64 totalPages: type: integer format: int32 last: type: boolean size: type: integer format: int32 number: type: integer format: int32 sort: $ref: '#/components/schemas/SortObject' first: type: boolean numberOfElements: type: integer format: int32 empty: type: boolean EntityPageResponse: type: object description: Paginated response containing Entity objects properties: content: type: array items: $ref: '#/components/schemas/EntityDtoOut' pageable: $ref: '#/components/schemas/PageableObject' totalElements: type: integer format: int64 totalPages: type: integer format: int32 last: type: boolean size: type: integer format: int32 number: type: integer format: int32 sort: $ref: '#/components/schemas/SortObject' first: type: boolean numberOfElements: type: integer format: int32 empty: type: boolean securitySchemes: clientId: type: oauth2 description: clientId authentication name: clientId flows: clientCredentials: tokenUrl: http://localhost:8080/auth/token bearer: type: http description: bearer authentication name: bearer scheme: bearer bearerFormat: JWT