openapi: 3.0.3
info:
  title: atlas-tags
  version: 0.0.1
paths:
  /healthChecks:
    get:
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgBmlAtlasTagsV0ModelsHealthCheck'
  /tags:
    post:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgBmlAtlasTagsV0ModelsTagForm'
        required: true
      responses:
        '201':
          description: Created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgBmlAtlasTagsV0ModelsTag'
        '409':
          description: 'Conflict. IE: the resource already exists. We return the existing
            tag so you can use it if you want to.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgBmlAtlasTagsV0ModelsTag'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgBmlValidationV0ModelsFieldValidationResponse'
  /tags/{tagId}:
    get:
      parameters:
      - name: tagId
        in: path
        description: A Tag resource id.
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgBmlAtlasTagsV0ModelsTag'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgBmlValidationV0ModelsFieldValidationResponse'
        '404':
          description: Not Found.
  /tags/{tagId}/objects:
    get:
      description: Access to the object set of a Tag, provides basic slice type cursor
        access.
      parameters:
      - name: tagId
        in: path
        description: A Tag resource id
        required: true
        schema:
          type: string
      - name: number
        in: query
        description: The number of the Slice you want
        required: true
        schema:
          type: integer
          format: int32
      - name: size
        in: query
        description: The size of this Slice you want.
        required: true
        schema:
          type: integer
          format: int32
      - name: objectSortField
        in: query
        description: 'The ObjectSortField you wish to sort on. NOTE: The only stable
          way to iterate through this list is by createdAt.'
        required: true
        schema:
          $ref: '#/components/schemas/OrgBmlAtlasTagsV0EnumsObjectSortField'
      - name: sortOrder
        in: query
        description: The SortOrder used to order the overall set.
        required: true
        schema:
          $ref: '#/components/schemas/OrgBmlAtlasTagsV0EnumsSortOrder'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgBmlAtlasTagsV0ModelsObjectsSlice'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgBmlValidationV0ModelsFieldValidationResponse'
        '404':
          description: Not Found.
components:
  schemas:
    OrgBmlAtlasTagsV0ModelsObjectId:
      description: Encapsulates an Object UUID Id.
      type: object
      required:
      - id
      - externalId
      properties:
        id:
          description: The tag services guid for this ObjectId.
          type: string
          format: uuid
        externalId:
          description: The external caller systems resource id for this Object.
          type: string
          format: uuid
        description:
          description: A short description of this object.
          type: string
          maxLength: 256
          minLength: 0
    OrgBmlAtlasTagsV0ModelsSortField:
      description: A field and an order used to sort sets.
      type: object
      required:
      - field
      - order
      properties:
        field:
          $ref: '#/components/schemas/OrgBmlAtlasTagsV0EnumsTagSortField'
          description: The field you want to sort on.
        order:
          $ref: '#/components/schemas/OrgBmlAtlasTagsV0EnumsSortOrder'
          description: The order you want to sort.
    OrgBmlAtlasTagsV0ModelsTag:
      description: A tag.
      type: object
      required:
      - id
      - value
      properties:
        id:
          description: A UUID string for this tag.
          type: string
          format: uuid
        value:
          description: The tag value
          example: v0.0.1
          type: string
          maxLength: 512
          minLength: 1
    OrgBmlAtlasTagsV0ModelsTagForm:
      description: A form for creating a tag object.
      type: object
      required:
      - value
      properties:
        value:
          description: The tag value
          example: v0.0.1
          type: string
          maxLength: 512
          minLength: 1
    OrgBmlAtlasTagsV0ModelsObjectsSlice:
      description: A slice of a set of objects.
      type: object
      required:
      - slice
      - objects
      properties:
        slice:
          $ref: '#/components/schemas/OrgBmlAtlasTagsV0ModelsSlice'
          description: The slice data for this slice.
        objects:
          description: A set of ObjectId's for this slice.
          type: array
          maxItems: 500
          items:
            $ref: '#/components/schemas/OrgBmlAtlasTagsV0ModelsObjectId'
    OrgBmlAtlasTagsV0ModelsHealthCheck:
      description: A response model for the standard health check resource.
      type: object
      required:
      - health
      - status
      properties:
        health:
          $ref: '#/components/schemas/OrgBmlAtlasTagsV0EnumsHealthCode'
          description: A general health status code.
          example: HEALTHY
        status:
          $ref: '#/components/schemas/OrgBmlAtlasTagsV0EnumsServiceStatus'
          description: A general service status code.
          example: RUNNING
    OrgBmlAtlasTagsV0ModelsSlice:
      description: An cursor Slice for iterating through sets.
      type: object
      required:
      - number
      - numberOfElements
      - size
      - hasContent
      - hasNext
      - hasPrevious
      - isFirst
      - isLast
      properties:
        number:
          description: The number of the current Slice.
          type: integer
          format: int32
        numberOfElements:
          description: The number of elements currently on this Slice.
          type: integer
          format: int32
        size:
          description: The size of this Slice.
          type: integer
          format: int32
        hasContent:
          description: Is there any content for this Slice.
          type: boolean
        hasNext:
          description: Is there is a next Slice.
          type: boolean
        hasPrevious:
          description: Is there is a previous Slice.
          type: boolean
        isFirst:
          description: Is this the first Slice.
          type: boolean
        isLast:
          description: Is this the last Slice.
          type: boolean
    OrgBmlValidationV0ModelsFieldValidationError:
      description: Error description object for a single field.
      type: object
      required:
      - path
      - message
      properties:
        path:
          description: The object path of the field.
          example: /searches/search.query
          type: string
          maxLength: 256
          minLength: 1
        message:
          description: A user friendly error message.
          example: Query parameter 'query' exceeds parameter maximum length of 512
            characters.
          type: string
          maxLength: 512
          minLength: 1
    OrgBmlValidationV0ModelsFieldValidationResponse:
      description: A response object for field validation errors.
      type: object
      required:
      - status
      - message
      - errors
      properties:
        status:
          description: The response status.
          type: integer
          format: int32
          minimum: 100
          maximum: 599
        message:
          description: The response message.
          type: string
          maxLength: 512
          minLength: 1
        errors:
          description: A set of field validation errors.
          type: array
          maxItems: 32
          items:
            $ref: '#/components/schemas/OrgBmlValidationV0ModelsFieldValidationError'
    OrgBmlAtlasTagsV0EnumsHealthCode:
      type: string
      enum:
      - HEALTHY
      - UNHEALTHY
    OrgBmlAtlasTagsV0EnumsObjectSortField:
      type: string
      enum:
      - id
      - createdAt
      - updatedAt
    OrgBmlAtlasTagsV0EnumsSortOrder:
      type: string
      enum:
      - asc
      - desc
    OrgBmlAtlasTagsV0EnumsServiceStatus:
      type: string
      enum:
      - STARTING_UP
      - RUNNING
      - SHUTTING_DOWN
    OrgBmlAtlasTagsV0EnumsTagSortField:
      type: string
      enum:
      - name
      - createdAt
      - updatedAt
