{
  "openapi": "3.1.0",
  "info": {
    "title": "Planview Universal Connector API",
    "description": "Defines a REST API that a repository can implement to enable integration with select Planview applications",
    "version": "1.31"
  },
  "servers": [
    {
      "url": "http://example.com"
    }
  ],
  "security": [
    {
      "api-key": []
    }
  ],
  "tags": [
    {
      "name": "repository"
    },
    {
      "name": "scope"
    },
    {
      "name": "schema"
    },
    {
      "name": "artifact"
    },
    {
      "name": "capability"
    },
    {
      "name": "person"
    },
    {
      "name": "comments"
    },
    {
      "name": "attachments"
    },
    {
      "name": "in development"
    }
  ],
  "paths": {
    "/artifacts": {
      "get": {
        "tags": [
          "artifact"
        ],
        "summary": "Search Artifact",
        "description": "Searches for artifacts matching the query parameters. Artifacts must be ordered by the modified_at value, with most recently modified first.",
        "operationId": "searchArtifacts",
        "parameters": [
          {
            "name": "project",
            "in": "query",
            "description": "The project to search for artifacts in",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "The type of artifact to search for",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "A cursor from a previous page can be supplied to get the next page.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "The query parameters are not valid. This includes non-existing project and type values.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The query parameters are valid and search results returned. Each PartialArtifact must include the artifact id, as well as attributes for fields which map to the semantics: REVISION, SUMMARY, and FORMATTED_ID, as well as MODIFIED if such a semantic exists on the artifact",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedPartialArtifacts"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "artifact"
        ],
        "summary": "Create Artifact",
        "description": "Creates a new artifact with the provided data and returns the unique and stable ID of the created artifact. The ID may only contain alphanumeric characters, dashes and underscores. The artifact must be fully created in the target repository before sending a successful response.",
        "operationId": "createArtifact",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Artifact"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Not authenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "Artifact created",
            "headers": {
              "Location": {
                "description": "The id of the created artifact. This can either be a fully qualified URL\n(e.g. https://myadapter.myhost.com/artifacts/123), a relative URL (e.g. /artifacts/123)\nor just the id (e.g. 123).\n",
                "style": "simple",
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The provided artifact payload is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/artifacts/{artifact-id}/attachments": {
      "post": {
        "tags": [
          "attachments"
        ],
        "summary": "Create artifact attachment",
        "description": "Creates an attachment on an artifact.",
        "operationId": "createArtifactAttachment",
        "parameters": [
          {
            "name": "artifact-id",
            "in": "path",
            "description": "The ID of the artifact on which to create an attachment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Multipart form data containing the attachment metadata and file, in that order. The metadata should be\nencoded as a JSON object. Each key in the object should correspond to a field id specified in the\nattachment metadata schema. Metadata attribute values semantically mapped to file name and size\nwill match that of the corresponding file part\u0027s values.\n",
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "metadata": {
                    "$ref": "#/components/schemas/AttachmentCreationMetadata"
                  }
                },
                "required": [
                  "file",
                  "metadata"
                ]
              },
              "encoding": {
                "metadata": {
                  "contentType": "application/json"
                }
              }
            }
          }
        },
        "responses": {
          "400": {
            "description": "The provided payload is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "The provided artifact does not exist.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "201": {
            "description": "Attachment created"
          }
        }
      }
    },
    "/artifacts/{id}": {
      "get": {
        "tags": [
          "artifact"
        ],
        "summary": "Retrieve Artifact",
        "description": "Retrieves an artifact with the provided artifact ID. IDs may only contain alphanumeric characters, dashes and underscores.",
        "operationId": "retrieveArtifact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the artifact to retrieve",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Artifact exists and is returned",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Artifact"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No artifact with the provided id exists",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "400": {
            "description": "The provided artifact id is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "artifact"
        ],
        "summary": "Update Artifact",
        "description": "Updates an artifact of the provided artifact ID with the provided data.Attributes in the request will replace the target artifact\u0027s corresponding attributes, with the exception of comments which are appended to the existing artifact\u0027s comments",
        "operationId": "updateArtifact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the artifact to update",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Artifact"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "description": "Not authenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No artifact with the provided id exists",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "204": {
            "description": "Artifact exists and is updated"
          },
          "400": {
            "description": "The provided artifact id or artifact payload is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/projects": {
      "get": {
        "tags": [
          "scope"
        ],
        "summary": "Get a Page of Projects",
        "description": "Return a page of available projects in the repository. A \u0027cursor\u0027 from a previous page can be supplied to get the next page.",
        "operationId": "getProjects",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "A cursor from a previous page can be supplied to get the next page.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Not authenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A page of project options.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedOptions"
                }
              }
            }
          },
          "400": {
            "description": "An invalid parameter was supplied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/persons": {
      "get": {
        "tags": [
          "person"
        ],
        "summary": "Search Person",
        "description": "Searches for persons matching the query parameters. An empty result set as well as multiple\n        pages of results are valid responses.\n",
        "operationId": "searchPersons",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "The query string, consisting of a person field, a URL-encoded equals sign, and the value to match.\nPossible fields are: email, displayname, username.\nIf a certain field does not exist or cannot be used in search, an empty result set should be returned.\n",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "username\u003djdoe"
          }
        ],
        "responses": {
          "400": {
            "description": "The query parameters are not valid. This includes a non-existing fieldID in the search term.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "501": {
            "description": "The requested operation is not implemented.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "The query parameters are valid and search results returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PersonSearchResponse"
                }
              }
            }
          }
        }
      }
    },
    "/persons/{id}": {
      "get": {
        "tags": [
          "person"
        ],
        "summary": "Retrieve Person",
        "description": "Retrieves a person with the provided person ID.",
        "operationId": "retrievePerson",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The ID of the person to retrieve",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Person exists and is returned",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Person"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "400": {
            "description": "The provided person id is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No person with the provided id exists",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "501": {
            "description": "The requested operation is not implemented.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/comment-fields": {
      "get": {
        "tags": [
          "comments"
        ],
        "summary": "Fetch comment schema details",
        "description": "Returns the schema of artifact comments, encompassing fields, metadata, and constraints. Each schema is unique to a particular project and artifact type.",
        "operationId": "retrieveCommentFields",
        "parameters": [
          {
            "name": "project",
            "in": "query",
            "description": "The project to retrieve the comment schema for",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "The type of artifact to retrieve the comment schema for",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Fields associated with comments, specified by its project and type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentSchema"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "400": {
            "description": "No project or type with the provided id exists",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/capabilities": {
      "get": {
        "tags": [
          "capability"
        ],
        "summary": "Retrieve Artifact Type Capabilities",
        "description": "Retrieves the capabilities of a specific artifact type in a given project.",
        "operationId": "getArtifactCapabilities",
        "parameters": [
          {
            "name": "project",
            "in": "query",
            "description": "The project to retrieve the artifact capabilities for",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "The type of artifact to retrieve the capabilities for",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Artifact capabilities for the given project and type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactCapabilities"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "400": {
            "description": "No project or type with the provided id exists",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/attachment-fields": {
      "get": {
        "tags": [
          "attachments"
        ],
        "summary": "Fetch attachment metadata schema details",
        "description": "Returns the schema of attachment metadata, encompassing fields, metadata, and constraints. Each schema is unique to a particular project and artifact type.",
        "operationId": "retrieveAttachmentFields",
        "parameters": [
          {
            "name": "project",
            "in": "query",
            "description": "The project to retrieve the attachment schema for",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "The type of artifact to retrieve the attachment schema for",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Not authenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Fields associated with attachments, specified by its project and type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentSchema"
                }
              }
            }
          },
          "400": {
            "description": "No project or type with the provided id exists",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/artifacts/{artifact-id}/attachments/{attachment-id}": {
      "get": {
        "tags": [
          "attachments"
        ],
        "summary": "Retrieve artifact attachment",
        "description": "Retrieves the given attachment of an artifact. The raw binary of the attachment alone should be returned.",
        "operationId": "retrieveArtifactAttachment",
        "parameters": [
          {
            "name": "artifact-id",
            "in": "path",
            "description": "The ID of the artifact on which the attachment is located. The ID may only contain alphanumeric characters, dashes and underscores.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attachment-id",
            "in": "path",
            "description": "The ID of the attachment to retrieve. The ID may only contain alphanumeric characters, dashes and underscores.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "The provided artifact or attachment id is not valid",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Attachment exists and is returned",
            "content": {
              "application/octet-stream": {}
            }
          },
          "404": {
            "description": "The provided artifact or attachment does not exist. The problem title should contain the string \u0027artifact-id\u0027 or \u0027attachment-id\u0027 to indicate which id is invalid.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/artifact-types": {
      "get": {
        "tags": [
          "scope"
        ],
        "summary": "Get a Page of Artifact Types",
        "description": "Return a page of available artifact types in the repository. A \u0027cursor\u0027 from a previous page can be supplied to get the next page.",
        "operationId": "getTypes",
        "parameters": [
          {
            "name": "project",
            "in": "query",
            "description": "The project to retrieve the artifact types for",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "A cursor from a previous page can be supplied to get the next page.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Not authenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "400": {
            "description": "An invalid parameter was supplied.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "A page of artifact type options.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedOptions"
                }
              }
            }
          }
        }
      }
    },
    "/artifact-fields": {
      "get": {
        "tags": [
          "schema"
        ],
        "summary": "Fetch artifact schema details",
        "description": "Returns the schema of an artifact, encompassing fields, metadata, and constraints. Each schema is unique to a particular project and artifact type.",
        "operationId": "retrieveArtifactFields",
        "parameters": [
          {
            "name": "project",
            "in": "query",
            "description": "The project to retrieve the artifact schema for",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "The type of artifact to retrieve the schema for",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Not authenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Fields associated with an artifact, specified by its project and type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArtifactSchema"
                }
              }
            }
          },
          "400": {
            "description": "No project or type with the provided id exists",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/artifact-fields/{field-id}/options": {
      "get": {
        "tags": [
          "schema"
        ],
        "summary": "Fetch available options for the provided field",
        "description": "Fetch available options for the provided field. The field must be a single select field.",
        "operationId": "retrieveOptions",
        "parameters": [
          {
            "name": "field-id",
            "in": "path",
            "description": "The ID of the field to retrieve options for",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "project",
            "in": "query",
            "description": "The project which contains the field to retrieve options for",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "The type of artifact which contains the field to retrieve options for",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "A cursor from a previous page can be supplied to get the next page.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Not authenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "400": {
            "description": "The project or type with the provided id is missing or invalid.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No field with the provided id exists.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Successful retrieval of options for the provided field.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedOptions"
                }
              }
            }
          }
        }
      }
    },
    "/": {
      "get": {
        "tags": [
          "repository"
        ],
        "summary": "Validate Connection",
        "description": "Validate that a connection can be successfully established to the repository and all of its services are running normally.",
        "operationId": "validate",
        "responses": {
          "500": {
            "description": "Unable to process request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "200": {
            "description": "Successful connection",
            "content": {
              "application/json": {}
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Artifact": {
        "type": "object",
        "description": "Representation of an API artifact.",
        "properties": {
          "project": {
            "type": "string",
            "description": "The ID of the project the artifact belongs to.",
            "example": "PROJ-A"
          },
          "type": {
            "type": "string",
            "description": "The ID of the type associated with the artifact.",
            "example": "Defect"
          },
          "id": {
            "type": "string",
            "description": "The unique internal ID used to retrieve the artifact. Required when retrieving existing artifacts",
            "example": 12345,
            "readOnly": true
          },
          "attributes": {
            "$ref": "#/components/schemas/attributes",
            "description": "Map of field IDs to their corresponding values. On creating or updating artifacts, there may or may not be default values used for fields not provided here.",
            "example": "{\"summary\": \"Lorem ipsum\",\n\"formatted_id\": \"US123\",\n\"revision\": \"a3f67e2b5f1b5fda5dee3225b644525f\",\n\"priority\": \"p_1\",\n\"modified_at\": \"2023-04-01T12:02:01.210Z\",\n\"is_closed\": false,\n\"tags\": [\"tag1\", \"tag2\"],\n\"location\": \"http://my.repo.com/artifacts/123\",\n\"assignee\": \"u12345\",\n\"cc\": [\"u12345\", \"u67890\"],\n\"description\": \"\u003chtml\u003e\u003cbody\u003e\u003ch1\u003eLorem ipsum\u003c/h1\u003e\u003cp\u003e\u003cstrong\u003eLorem ipsum\u003c/strong\u003e dolor sit amet, consectetur adipiscing elit.\u003c/p\u003e\u003c/body\u003e\u003c/html\u003e\",\n\"rank\":\"9876543210\",\n\"parent_artifact\": \"321\",\n\"custom_linked_artifacts\": [\"123\", \"456\"]\n\"comments\": [\n    {\n        \"id\": \"c1\",\n        \"content\": \"\u003cb\u003ethis is a comment\u003c/b\u003e\",\n        \"created_on\": \"2024-04-19T01:45:00.000Z\",\n        \"creator\": \"u1\"\n    },\n    {\n        \"id\": \"c2\",\n        \"content\": \"\u003ch1\u003ethis is another comment\u003c/h1\u003e\",\n        \"created_on\": \"2024-04-19T01:46:00.000Z\",\n        \"creator\": \"u2\"\n    }\n],\n\"attachments\": [\n    {\n        \"id\": \"a1\",\n        \"file_name\": \"file.txt\",\n        \"description\": \"a file\",\n        \"size\": \"1024\",\n        \"created_on\": \"2024-04-19T01:45:00.000Z\",\n        \"creator\": \"u1\"\n    }\n}\n"
          }
        },
        "required": [
          "attributes",
          "id",
          "project",
          "type"
        ]
      },
      "attributes": {
        "type": "object",
        "description": "Map of field IDs to their corresponding values. On creating or updating artifacts, there may or may not be default values used for fields not provided here.",
        "example": "{\"summary\": \"Lorem ipsum\",\n\"formatted_id\": \"US123\",\n\"revision\": \"a3f67e2b5f1b5fda5dee3225b644525f\",\n\"priority\": \"p_1\",\n\"modified_at\": \"2023-04-01T12:02:01.210Z\",\n\"is_closed\": false,\n\"tags\": [\"tag1\", \"tag2\"],\n\"location\": \"http://my.repo.com/artifacts/123\",\n\"assignee\": \"u12345\",\n\"cc\": [\"u12345\", \"u67890\"],\n\"description\": \"\u003chtml\u003e\u003cbody\u003e\u003ch1\u003eLorem ipsum\u003c/h1\u003e\u003cp\u003e\u003cstrong\u003eLorem ipsum\u003c/strong\u003e dolor sit amet, consectetur adipiscing elit.\u003c/p\u003e\u003c/body\u003e\u003c/html\u003e\",\n\"rank\":\"9876543210\",\n\"parent_artifact\": \"321\",\n\"custom_linked_artifacts\": [\"123\", \"456\"]\n\"comments\": [\n    {\n        \"id\": \"c1\",\n        \"content\": \"\u003cb\u003ethis is a comment\u003c/b\u003e\",\n        \"created_on\": \"2024-04-19T01:45:00.000Z\",\n        \"creator\": \"u1\"\n    },\n    {\n        \"id\": \"c2\",\n        \"content\": \"\u003ch1\u003ethis is another comment\u003c/h1\u003e\",\n        \"created_on\": \"2024-04-19T01:46:00.000Z\",\n        \"creator\": \"u2\"\n    }\n],\n\"attachments\": [\n    {\n        \"id\": \"a1\",\n        \"file_name\": \"file.txt\",\n        \"description\": \"a file\",\n        \"size\": \"1024\",\n        \"created_on\": \"2024-04-19T01:45:00.000Z\",\n        \"creator\": \"u1\"\n    }\n}\n",
        "properties": {
          "empty": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "Problem": {
        "type": "object",
        "description": "Problem payload schema complying with RFC 7807",
        "properties": {
          "type": {
            "type": "string",
            "format": "uri-reference",
            "description": "A URI reference that uniquely identifies the problem type only in the context of the provided API. As opposed to the specification in RFC-7807, URI\u0027s are not globally unique for the problem type nor can they be dereferenced.",
            "example": "/some/uri-reference"
          },
          "instance": {
            "type": "string",
            "format": "uri-reference",
            "description": "A URI reference that identifies the specific occurrence of the problem.",
            "example": "/some/uri-reference#specific-occurrence-context"
          },
          "title": {
            "type": "string",
            "description": "A short English summary of the problem type suitable for engineers.",
            "example": "title for the error situation"
          },
          "detail": {
            "type": "string",
            "description": "An English explanation specific to this occurrence of the problem with advice on how to proceed. Suitable for engineers, ",
            "example": "description for the error situation"
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
            "maximum": 600,
            "minimum": 100
          }
        },
        "required": [
          "detail",
          "instance",
          "status",
          "title",
          "type"
        ]
      },
      "AttachmentCreationMetadata": {
        "type": "object",
        "description": "Metadata for creating an attachment. Example:\n\n    {\n\n        \"filename\":\"config.sys\",\n\n        \"size\":\"1234\",\n\n        \"creator\":\"paul.allen\",\n\n        \"description\":\"The primary configuration file for the DOS and OS/2 operating systems.\",\n\n        \"created\":\"1983-03-08T00:00:00.000Z\",\n\n        \"mediatype\":\"application/octet-stream\",\n\n    }\n",
        "properties": {
          "attributes": {
            "$ref": "#/components/schemas/Attributes"
          }
        },
        "required": [
          "attributes"
        ]
      },
      "Attributes": {
        "type": "object",
        "properties": {
          "empty": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "Option": {
        "type": "object",
        "description": "Represents an available or selected option for a single or multi-select field.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of the option must be unique for its associating field across the repository."
          },
          "label": {
            "type": "string",
            "description": "The label of the option should be unique for its associating field across the repository to avoid ambiguity."
          }
        },
        "required": [
          "id",
          "label"
        ]
      },
      "PagedOptions": {
        "type": "object",
        "description": "Represents a page of options.",
        "properties": {
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The cursor for the next page, or not provided if the last element is included in the payload"
          },
          "items": {
            "type": "array",
            "description": "The items for this page",
            "items": {
              "$ref": "#/components/schemas/Option"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "Person": {
        "type": "object",
        "description": "Representation of an API person.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique internal ID used to retrieve the person. The ID may only contain alphanumeric characters, dashes and underscores.",
            "example": "u_12345",
            "readOnly": true
          },
          "username": {
            "type": [
              "string",
              "null"
            ],
            "description": "The username of the person. Most likely unique. Often also referred to as login name, account name or user ID.",
            "example": "jdoe",
            "readOnly": true
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "The email of the person. Most likely unique.",
            "example": "jamie.doe@example.com",
            "readOnly": true
          },
          "displayname": {
            "type": [
              "string",
              "null"
            ],
            "description": "The display name of the person.",
            "example": "Jamie Doe",
            "readOnly": true
          },
          "firstname": {
            "type": [
              "string",
              "null"
            ],
            "description": "The first name of the person.",
            "example": "Jamie",
            "readOnly": true
          },
          "lastname": {
            "type": [
              "string",
              "null"
            ],
            "description": "The last name of the person.",
            "example": "Doe",
            "readOnly": true
          }
        },
        "required": [
          "id"
        ]
      },
      "PersonSearchResponse": {
        "type": "object",
        "description": "Person search response",
        "properties": {
          "items": {
            "type": "array",
            "description": "The list of persons",
            "items": {
              "$ref": "#/components/schemas/Person"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "CommentField": {
        "type": "object",
        "description": "Describes the properties of a field within a comment.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique and stable identifier for the comment field.",
            "example": "content_123"
          },
          "label": {
            "type": "string",
            "description": "The user-friendly label used to represent the field.",
            "example": "Content"
          },
          "type": {
            "type": "string",
            "description": "The categorization of the field based on predefined types.",
            "enum": [
              "STRING",
              "SINGLE_SELECT",
              "DATE_TIME",
              "URI",
              "BOOLEAN",
              "MULTI_SELECT",
              "SINGLE_PERSON",
              "MULTI_PERSON",
              "RICHTEXT_HTML",
              "COMMENTS",
              "INTEGER",
              "ATTACHMENTS",
              "SINGLE_ARTIFACT_LINK",
              "MULTI_ARTIFACT_LINK"
            ],
            "example": "STRING"
          },
          "semantic": {
            "type": "string",
            "description": "A descriptor used to specify the semantic association of a field. Signifies that this field has a specific semantic meaning within the system, allowing for clearer data representation and interpretation.",
            "enum": [
              "CONTENT",
              "ID",
              "CREATOR",
              "CREATED_ON"
            ],
            "example": "CONTENT"
          },
          "required": {
            "type": [
              "boolean",
              "null"
            ],
            "default": "false",
            "description": "A boolean value indicating whether the field is required or not.",
            "example": true
          },
          "read_only": {
            "type": [
              "boolean",
              "null"
            ],
            "default": "false",
            "description": "A boolean value indicating whether the field is read-only or not.",
            "example": true
          }
        },
        "required": [
          "id",
          "label",
          "semantic",
          "type"
        ]
      },
      "CommentSchema": {
        "type": "object",
        "description": "Describes the properties and structure of a comment.",
        "properties": {
          "fields": {
            "type": [
              "array",
              "null"
            ],
            "description": "Collection of field definitions providing metadata, constraints, and semantic for the comment.",
            "example": [
              {
                "id": "id",
                "label": "Id",
                "type": "STRING",
                "semantic": "ID",
                "read_only": true
              },
              {
                "id": "creator",
                "label": "Creator",
                "type": "SINGLE_PERSON",
                "semantic": "CREATOR"
              },
              {
                "id": "createdon",
                "label": "Created On",
                "type": "DATE_TIME",
                "semantic": "CREATED_ON"
              },
              {
                "id": "content",
                "label": "Content",
                "type": "RICHTEXT_HTML",
                "semantic": "CONTENT"
              }
            ],
            "items": {
              "$ref": "#/components/schemas/CommentField"
            }
          }
        }
      },
      "ArtifactCapabilities": {
        "type": "object",
        "description": "Represents the capabilities of an artifact type",
        "properties": {
          "update_artifact_supported": {
            "type": [
              "boolean",
              "null"
            ],
            "default": "false",
            "description": "Indicates whether the artifact type supports updating artifacts"
          },
          "create_artifact_supported": {
            "type": [
              "boolean",
              "null"
            ],
            "default": "false",
            "description": "Indicates whether the artifact type supports creating artifacts"
          }
        }
      },
      "AttachmentField": {
        "type": "object",
        "description": "Describes the properties of a field within an attachment metadata object.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique and stable identifier for the attachment field.",
            "example": "file_name"
          },
          "label": {
            "type": "string",
            "description": "The user-friendly label used to represent the field.",
            "example": "File Name"
          },
          "type": {
            "type": "string",
            "description": "The categorization of the field based on predefined types.",
            "enum": [
              "STRING",
              "SINGLE_SELECT",
              "DATE_TIME",
              "URI",
              "BOOLEAN",
              "MULTI_SELECT",
              "SINGLE_PERSON",
              "MULTI_PERSON",
              "RICHTEXT_HTML",
              "COMMENTS",
              "INTEGER",
              "ATTACHMENTS",
              "SINGLE_ARTIFACT_LINK",
              "MULTI_ARTIFACT_LINK"
            ],
            "example": "STRING"
          },
          "semantic": {
            "type": "string",
            "description": "A descriptor used to specify the semantic association of a field. Signifies that this field has a specific semantic meaning within the system, allowing for clearer data representation and interpretation.",
            "enum": [
              "ID",
              "FILE_NAME",
              "SIZE",
              "CREATOR",
              "CREATED_ON",
              "DESCRIPTION",
              "MEDIA_TYPE"
            ],
            "example": "FILE_NAME"
          },
          "required": {
            "type": [
              "boolean",
              "null"
            ],
            "default": "false",
            "description": "A boolean value indicating whether the field is required or not.",
            "example": true
          },
          "read_only": {
            "type": [
              "boolean",
              "null"
            ],
            "default": "false",
            "description": "A boolean value indicating whether the field is read-only or not.",
            "example": true
          }
        },
        "required": [
          "id",
          "label",
          "semantic",
          "type"
        ]
      },
      "AttachmentSchema": {
        "type": "object",
        "description": "Describes the properties and structure of an attachment metadata object.",
        "properties": {
          "fields": {
            "type": [
              "array",
              "null"
            ],
            "description": "Collection of field definitions providing metadata, constraints, and semantic for the attachment metadata.",
            "example": [
              {
                "id": "id",
                "label": "Id",
                "type": "STRING",
                "semantic": "ID",
                "read_only": true
              },
              {
                "id": "filename",
                "label": "File Name",
                "type": "STRING",
                "semantic": "FILE_NAME"
              },
              {
                "id": "size",
                "label": "Size",
                "type": "LONG",
                "semantic": "SIZE"
              },
              {
                "id": "created_on",
                "label": "Created On",
                "type": "DATE_TIME",
                "semantic": "CREATED_ON"
              },
              {
                "id": "creator",
                "label": "Creator",
                "type": "SINGLE_PERSON",
                "semantic": "CREATOR"
              },
              {
                "id": "media_type",
                "label": "Media Type",
                "type": "STRING",
                "semantic": "MEDIA_TYPE"
              },
              {
                "id": "description",
                "label": "Description",
                "type": "STRING",
                "semantic": "DESCRIPTION"
              }
            ],
            "items": {
              "$ref": "#/components/schemas/AttachmentField"
            }
          }
        }
      },
      "PagedPartialArtifacts": {
        "type": "object",
        "description": "Artifact search response",
        "properties": {
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The cursor for the next page, or not provided if the last element is included in the payload"
          },
          "items": {
            "type": "array",
            "description": "The items for this page",
            "items": {
              "$ref": "#/components/schemas/PartialArtifact"
            }
          }
        },
        "required": [
          "items"
        ]
      },
      "PartialArtifact": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The unique internal ID used to retrieve the artifact.",
            "example": 12345
          },
          "attributes": {
            "$ref": "#/components/schemas/attributes",
            "description": "Map of field IDs to their corresponding values.",
            "example": {
              "summary": "Lorem ipsum",
              "formatted_id": "US123",
              "revision": "a3f67e2b5f1b5fda5dee3225b644525f",
              "modified_at": "2023-04-01T12:02:01.210Z"
            }
          }
        },
        "required": [
          "attributes"
        ]
      },
      "ArtifactField": {
        "type": "object",
        "description": "Describes the properties of a field within an artifact.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique and stable identifier for the artifact field.",
            "example": "field_id_123"
          },
          "label": {
            "type": "string",
            "description": "The user-friendly label used to represent the field.",
            "example": "Reproduction Steps"
          },
          "type": {
            "type": "string",
            "description": "The categorization of the field based on predefined types.",
            "enum": [
              "STRING",
              "SINGLE_SELECT",
              "DATE_TIME",
              "URI",
              "BOOLEAN",
              "MULTI_SELECT",
              "SINGLE_PERSON",
              "MULTI_PERSON",
              "RICHTEXT_HTML",
              "COMMENTS",
              "INTEGER",
              "ATTACHMENTS",
              "SINGLE_ARTIFACT_LINK",
              "MULTI_ARTIFACT_LINK"
            ],
            "example": "STRING"
          },
          "semantic": {
            "type": [
              "string",
              "null"
            ],
            "description": "A descriptor used to specify the semantic association of a field. When provided, it signifies that this field has a specific semantic meaning within the system, allowing for clearer data representation and interpretation.",
            "enum": [
              "SUMMARY",
              "FORMATTED_ID",
              "REVISION",
              "STATUS",
              "MODIFIED",
              "CREATED",
              "LOCATION",
              "ASSIGNEE",
              "ASSIGNEES",
              "PARENT",
              null
            ],
            "example": "SUMMARY"
          },
          "read_only": {
            "type": [
              "boolean",
              "null"
            ],
            "default": "false",
            "description": "A boolean value indicating whether the field is read-only or not.",
            "example": true
          },
          "required": {
            "type": [
              "boolean",
              "null"
            ],
            "default": "false",
            "description": "A boolean value indicating whether the field is required or not.",
            "example": true
          },
          "available_on_create": {
            "type": [
              "boolean",
              "null"
            ],
            "default": "false",
            "description": "A boolean value indicating whether the field is available to write during artifact creation.",
            "example": true
          }
        },
        "required": [
          "id",
          "label",
          "type"
        ]
      },
      "ArtifactSchema": {
        "type": "object",
        "description": "Describes the properties and structure of an artifact.",
        "properties": {
          "fields": {
            "type": [
              "array",
              "null"
            ],
            "description": "Collection of field definitions providing metadata, constraints, and semantic for the artifact.",
            "example": " [{\"id\":\"id\",\"label\":\"Id\",\"type\":\"STRING\",\"semantic\":\"ID\",\"read_only\":true},\n {\"id\":\"formatted_id\",\"label\":\"Formatted Id\",\"type\":\"STRING\",\"semantic\":\"FORMATTED_ID\",\"read_only\":true},\n {\"id\":\"summary\",\"label\":\"Summary\",\"type\":\"STRING\",\"semantic\":\"SUMMARY\"},\n {\"id\":\"description\",\"label\":\"Description\",\"type\":\"STRING\"},\n {\"id\":\"status\",\"label\":\"Status\",\"type\":\"SINGLE_SELECT\"},\n {\"id\":\"tags\",\"label\":\"Tags\",\"type\":\"MULTI_SELECT\"},\n {\"id\":\"closed\",\"label\":\"Closed\",\"type\":\"BOOLEAN\"},\n {\"id\":\"location\",\"label\":\"Location\",\"type\":\"URI\",\"semantic\":\"LOCATION\",\"read_only\":true},\n {\"id\":\"modified_at\",\"label\":\"Last Modified At\",\"type\":\"DATE_TIME\",\"semantic\":\"MODIFIED\",\"read_only\":true},\n {\"id\":\"created_at\",\"label\":\"Created At\",\"type\":\"DATE_TIME\",\"semantic\":\"CREATED\",\"read_only\":true},\n {\"id\":\"assignee\",\"label\":\"Assignee\",\"type\":\"SINGLE_PERSON\"},\n {\"id\":\"cc\",\"label\":\"Watchers\",\"type\":\"MULTI_PERSON\"},\n {\"id\":\"description\",\"label\":\"Description\",\"type\":\"RICHTEXT_HTML\"},\n {\"id\":\"attachments\",\"label\":\"Attachments\",\"type\":\"ATTACHMENTS\"},\n {\"id\":\"rank\",\"label\":\"Rank\",\"type\":\"INTEGER\",\"read_only\":true},\n {\"id\":\"comments\",\"label\":\"Comments\",\"type\":\"COMMENTS\"},\n {\"id\":\"parent_artifact\",\"label\":\"Parent Artifact\",\"semantic\":\"PARENT\",\"type\":\"SINGLE_ARTIFACT_LINK\"},\n {\"id\":\"custom_linked_artifacts\",\"label\":\"Custom Related Items\",\"type\":\"MULTI_ARTIFACT_LINK}]\n",
            "items": {
              "$ref": "#/components/schemas/ArtifactField"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "api-key": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}