IronCore Labs Tag API

Label shared between service account configs and tenants. Controls where KMS configurations can be sent.

OpenAPI Specification

ironcore-labs-tag-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Vendor API Bridge Configuration Assignment Tag API
  version: 3.1.0
  description: API used to manage tenants and KMS configurations by communicating with the IronCore Configuration Broker on your behalf.
  contact:
    name: IronCore Labs
    url: www.ironcorelabs.com
    email: info@ironcorelabs.com
  summary: IronCore Vendor API Bridge
servers:
- url: http://localhost:3000/api
  description: Local
security:
- Authorization: []
tags:
- name: Tag
  description: Label shared between service account configs and tenants. Controls where KMS configurations can be sent.
paths:
  /1/tags:
    parameters: []
    get:
      summary: Tag List
      responses:
        '200':
          $ref: '#/components/responses/TagListResponse'
        '401':
          description: Unauthorized
      operationId: get-tags
      description: List all the tags created by the current vendor organization.
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/pageSize'
      - schema:
          type: string
        in: query
        name: tagText
        description: Tag text to filter to
      - $ref: '#/components/parameters/iclRequestorId'
      tags:
      - Tag
    post:
      summary: Tag Create
      operationId: post-tags
      responses:
        '200':
          $ref: '#/components/responses/TagCreateResponse'
        '401':
          description: Unauthorized
        '422':
          description: 'Unprocessable Entity (WebDAV)

            Provided tag name already exists.'
      tags:
      - Tag
      description: Create a new tag in the organization. This tag can then be assigned to tenants and service account configs to control access to KMS configurations. When a tag is no longer being used by an tenants or service account configs, it may be automatically deleted.
      requestBody:
        $ref: '#/components/requestBodies/TagCreateRequest'
      parameters:
      - $ref: '#/components/parameters/iclRequestorId'
  /1/tags/{tagId}/tenants:
    parameters:
    - $ref: '#/components/parameters/tagId'
    post:
      summary: Tag Assign to Tenant
      operationId: post-tags-tagId-tenants
      responses:
        '200':
          $ref: '#/components/responses/TagAssignmentModifyResponse'
        '400':
          description: "Bad Request  \nInvalid Tag ID provided  "
        '401':
          description: Unauthorized
      description: Assign the given tag to a number of tenants.
      requestBody:
        $ref: '#/components/requestBodies/TagAssignmentModifyRequest'
      tags:
      - Tag
      parameters:
      - $ref: '#/components/parameters/iclRequestorId'
    delete:
      summary: Tag Remove from Tenant
      operationId: delete-tags-tagId-tenants
      responses:
        '200':
          $ref: '#/components/responses/TagAssignmentModifyResponse'
        '400':
          description: "Bad Request  \nInvalid Tag ID provided  "
        '401':
          description: Unauthorized
      description: Remove the association between the given tag and a number of tenants.
      requestBody:
        $ref: '#/components/requestBodies/TagAssignmentModifyRequest'
      tags:
      - Tag
      parameters:
      - $ref: '#/components/parameters/iclRequestorId'
components:
  requestBodies:
    TagCreateRequest:
      content:
        application/json:
          schema:
            type: object
            properties:
              tagText:
                type: string
                description: Text used to describe the tag
            required:
            - tagText
      description: Request to create a tag in the vendor's organization.
    TagAssignmentModifyRequest:
      content:
        application/json:
          schema:
            type: object
            properties:
              tenantIds:
                type: array
                items:
                  $ref: '#/components/schemas/TenantId'
            required:
            - tenantIds
      description: Request to modify tenants for a tag.
  responses:
    TagCreateResponse:
      description: Response from creating a tag
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Tag'
            description: Newly created tag. `default` will always be `false`.
          examples:
            Example 1:
              value:
                id: 1
                tagText: string
                default: true
                created: '2022-01-13T21:44:43.653Z'
    TagListResponse:
      description: Result of listing tags
      content:
        application/json:
          schema:
            type: object
            properties:
              result:
                type: array
                description: List of tags
                items:
                  $ref: '#/components/schemas/Tag'
              page:
                type: integer
                description: Current response page number
              totalPages:
                type: integer
                description: Total number of response pages
            required:
            - result
            - page
            - totalPages
        application/javascript:
          schema:
            type: object
            properties: {}
    TagAssignmentModifyResponse:
      description: Response of modifying the tenants associated with a tag
      content:
        application/json:
          schema:
            type: object
            properties:
              succeeded:
                type: array
                description: Tenants successfully modified
                items:
                  $ref: '#/components/schemas/TenantId'
              failed:
                type: array
                description: Tenants who failed to be modified
                items:
                  $ref: '#/components/schemas/TagAssignmentModifyFailure'
            required:
            - succeeded
            - failed
  parameters:
    tagId:
      name: tagId
      in: path
      required: true
      schema:
        type: integer
      description: Tag ID
    iclRequestorId:
      name: icl-requestor-id
      in: header
      required: true
      schema:
        type: string
      description: ID of requesting user/service
    page:
      name: page
      in: query
      required: false
      schema:
        type: integer
        default: 1
        minimum: 1
      description: Page number to return
    pageSize:
      name: pageSize
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        default: 10
      description: Number of entries returned per page
  schemas:
    TagId:
      title: TagId
      x-stoplight:
        id: suvs45x4i6s3z
      type: integer
      description: Tag ID
      minimum: 1
    Tag:
      title: Tag
      x-stoplight:
        id: 2xbpiy93efxn2
      type: object
      description: Tag used to associate tenants with service accounts (TSP or VA accounts)
      properties:
        id:
          $ref: '#/components/schemas/TagId'
          description: Tag ID
        tagText:
          type: string
          description: Human-readable text associated with tag
        default:
          type: boolean
          description: Whether this is the default tag for tenants/service accounts
        created:
          $ref: '#/components/schemas/Timestamp'
          description: When this tag was created
      required:
      - id
      - tagText
      - default
      - created
    Timestamp:
      type: string
      title: Timestamp
      description: RFC3339 timestamp
      pattern: ^((?:(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2}(?:\.\d+)?))(Z|[\+-]\d{2}:\d{2})?)$
      examples:
      - '2022-01-13T21:44:43.653Z'
      example: '2022-01-13T21:44:43.653Z'
    TenantId:
      title: TenantId
      type: string
      description: Tenant ID
      examples:
      - tenant-icl
    TagAssignmentModifyFailure:
      title: TagAssignmentModifyFailure
      x-stoplight:
        id: 6j7llto2bjg4f
      type: object
      description: Failure with modifying the tenants associated with a tag.
      properties:
        tenantId:
          $ref: '#/components/schemas/TenantId'
          description: Tenant who failed to be modified
        message:
          type: string
          description: Reason for the failure
      required:
      - tenantId
      - message
  securitySchemes:
    Authorization:
      name: Authorization
      type: apiKey
      in: header
      description: 'VAB authorization header. Form: `vab:1:<API_KEY>`'
x-stoplight:
  id: jiu0tsbmtfigo