From d4296998b9123b3b44bf9fc2daf034bd7768327b Mon Sep 17 00:00:00 2001 From: Willem Veelenturf Date: Sat, 4 Nov 2023 13:36:05 +0100 Subject: [PATCH] Check for correct api version and add extra test case. --- build.gradle.kts | 2 +- .../kotlinx/openapi/bindings/v2/OpenAPI.kt | 9 +- .../kotlinx/openapi/bindings/v3/OpenAPI.kt | 9 +- .../resources/examples/v3/tempo-core.json | 10427 ++++++++++++++++ .../openapi/bindings/v2/OpenAPITests.kt | 12 + .../openapi/bindings/v3/OpenAPITests.kt | 17 + 6 files changed, 10473 insertions(+), 3 deletions(-) create mode 100644 src/commonTest/resources/examples/v3/tempo-core.json diff --git a/build.gradle.kts b/build.gradle.kts index 79cbfb8..35d4ae3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,7 +9,7 @@ plugins { } group = "community.flock.kotlinx.openapi.bindings" -version = "0.0.17" +version = "0.0.18" val dokkaOutputDir = "$buildDir/dokka" diff --git a/src/commonMain/kotlin/community/flock/kotlinx/openapi/bindings/v2/OpenAPI.kt b/src/commonMain/kotlin/community/flock/kotlinx/openapi/bindings/v2/OpenAPI.kt index d9a2146..cb0ac6f 100644 --- a/src/commonMain/kotlin/community/flock/kotlinx/openapi/bindings/v2/OpenAPI.kt +++ b/src/commonMain/kotlin/community/flock/kotlinx/openapi/bindings/v2/OpenAPI.kt @@ -31,7 +31,8 @@ sealed class OpenAPI( fun decodeFromString(string: String): SwaggerObject { return json - .decodeFromString(string) + .decodeFromString(string) + .validate() .traverse({ path, obj -> obj.encodeExtensions(path) }) .let { json.decodeFromJsonElement(it) } } @@ -47,6 +48,12 @@ sealed class OpenAPI( companion object Default : OpenAPI() } +private fun JsonObject.validate() = apply { + if (!containsKey("swagger")){ + error("No valid openapi v2 element 'swagger' is missing") + } +} + private fun JsonObject.encodeExtensions(path: String): JsonObject { val (known, unknown) = this.toList() .partition { !regex.hasMatchedRegex("$path${it.first}|") } diff --git a/src/commonMain/kotlin/community/flock/kotlinx/openapi/bindings/v3/OpenAPI.kt b/src/commonMain/kotlin/community/flock/kotlinx/openapi/bindings/v3/OpenAPI.kt index dd45366..559ec16 100644 --- a/src/commonMain/kotlin/community/flock/kotlinx/openapi/bindings/v3/OpenAPI.kt +++ b/src/commonMain/kotlin/community/flock/kotlinx/openapi/bindings/v3/OpenAPI.kt @@ -31,7 +31,8 @@ sealed class OpenAPI( fun decodeFromString(string: String): OpenAPIObject { return json - .decodeFromString(string) + .decodeFromString(string) + .validate() .traverse({ path, obj -> obj.encodeExtensions(path) }) .let { json.decodeFromJsonElement(it) } } @@ -47,6 +48,12 @@ sealed class OpenAPI( companion object Default : OpenAPI() } +private fun JsonObject.validate() = apply { + if (!containsKey("openapi")){ + error("No valid openapi v3 element 'openapi' is missing") + } +} + private fun JsonObject.encodeExtensions(path: String): JsonObject { val (known, unknown) = this.toList() .partition { !regex.hasMatchedRegex("$path${it.first}|") } diff --git a/src/commonTest/resources/examples/v3/tempo-core.json b/src/commonTest/resources/examples/v3/tempo-core.json new file mode 100644 index 0000000..4f28b49 --- /dev/null +++ b/src/commonTest/resources/examples/v3/tempo-core.json @@ -0,0 +1,10427 @@ +{ + "openapi": "3.0.1", + "info": { + "description": "
\n This documentation is for version 4 of the Tempo REST API, which is the latest version. To read documentation for version 3 of the Tempo REST API, click here \n
\n\nWe encourage you to join our developer community on Slack at [www.tempo.io/developers](https://www.tempo.io/developers), where you\ncan get support from our internal experts and share best practices with other developers building with Tempo.\n\nIf you have feedback or requests, you can also reach us through our Customer Support Portal. You can find general product \ninformation in the Tempo Help Center.\n\nBelow are links to other Tempo APIs.\n\n\n## Base Paths for API Access\n\nWe recommend using a geographically direct base path, when possible, to ensure you have the quickest and most efficient access to our services based where your tempo data resides.\n\n* https://api.eu.tempo.io/4 : Use this for clients based in Europe.\n* https://api.us.tempo.io/4 : Use this for clients based in the Americas.\n* https://api.tempo.io/4 : Use this if your clients are based in other locations, if you are unsure where your client is installed, or if you prefer a universal path.\n\nIf you use a base path for a different cluster than the one you installed, you will receive an authorization error.\n\n## Authentication\n### Using the REST API as an individual user\n\nYou can use the REST API to interact with the data your permissions give you access to. To do so, you will need to \ngenerate a Tempo OAuth 2.0 token.\n\nGo to **Tempo>Settings**, scroll down to **Data Access** and select **API integration**.\n\nOnce you have a token, you need to use it inside the Authorization HTTP header. Ex:\n\n`curl -v -H \"Authorization: Bearer $token\" \"https://api.tempo.io/4/worklogs?...\"`

\n\n### Using the REST API as an application developer\n\nIf you are building apps with Tempo, and have the required Tempo administrator permissions, you can quickly \nobtain the OAuth 2.0 credentials you need to retrieve an access token. Access tokens grant temporary, secure \naccess to Tempo, based on your current permissions.\n\n#### Obtain your credentials\n\nGo to **Tempo>Settings**, scroll down to **Data Access** and select **OAuth 2.0 authentication**.\n\nEnter a Redirect URI and specify the Client type and Authorization grant type.\n\nOnce you click **Add**, your Client ID and Client secret are generated and you can retrieve your access token.

\n\n### How to retrieve an access token for a user\n#### Authorization grant type used is *authorization_code*\n##### Step 1\nObtain an authorization code against your Jira Cloud instance :\n\n`GET: https://{jira-cloud-instance-name}.atlassian.net/plugins/servlet/ac/io.tempo.jira/oauth-authorize/?client_id=$CLIENT_ID&redirect_uri=$REDIRECT_URI`\n\nWhere *$CLIENT_ID* and *$REDIRECT_URI* match the one you generated in **Tempo > Settings > OAuth 2.0 Applications**\n\nYou will be asked to *authorize* or *deny* access to your Tempo data. Granting access redirects you to the configured \n*redirect URI* with a new query string parameter named *code* (this is the authorization code). Note that this authorization code \nexpires quickly.\n\n![MyApp Request Access](myapp-request-access.png \"MyApp Request Access\")\n\n##### Step 2\nObtain an access token from Tempo by providing the *authorization code* to:\n\n`POST: https://api.tempo.io/oauth/token/`\n\nsending the following parameters in the body using the \"application/x-www-form-urlencoded\" format:\n```\ngrant_type = \"authorization_code\"\nclient_id = $CLIENT_ID\nclient_secret = $CLIENT_SECRET\nredirect_uri = $REDIRECT_URI\ncode = $CODE\n```\n\nThe response includes the access token itself, related information, and a refresh token.\n```JSON\n{\n \"access_token\":\"$ACCESS_TOKEN\",\n \"expires_in\":5184000,\n \"token_type\":\"Bearer\",\n \"scope\":\"read write\",\n \"refresh_token\":\"$REFRESH_TOKEN\"\n}\n```\n\n##### Step 3\nProvide this *access token* to any API requests using the *Authorization header* :\n\n`curl -H \"Authorization: Bearer $ACCESS_TOKEN\" \"https://api.tempo.io/4/worklogs?from=2022-01-28&to=2022-02-03\"`\n\nThe access token will expire after the number of seconds specified in the **expires_in** field and will \nno longer be usable.\n\n### How to retrieve a new access token from the refresh token\nThe *access token* will eventually expire. You need to renew it using the previously received *refresh token*:\n\n`POST: https://api.tempo.io/oauth/token/`\n\nsending the following parameters in the body using the \"application/x-www-form-urlencoded\" format:\n```\ngrant_type = \"refresh_token\"\nclient_id = $CLIENT_ID\nclient_secret = $CLIENT_SECRET\nredirect_uri = $REDIRECT_URI\nrefresh_token = $REFRESH_TOKEN\n```\n\nThe response will contain a new *access token* and a new *refresh token*. You'll need to utilize these \nnew tokens for future calls, as the previous ones will no longer be valid.\n\n### How to revoke a token\nYou can revoke an existing *access token* at any time:\n\n`POST: https://api.tempo.io/oauth/revoke_token/`\n\nsending the following parameters in the body using the \"application/x-www-form-urlencoded\" format:\n```\ntoken_type_hint = \"access_token\"\nclient_id = $CLIENT_ID\nclient_secret = $CLIENT_SECRET\ntoken = $ACCESS_TOKEN\n```\n\nYou can also revoke an existing *refresh token*:\n\n`POST: https://api.tempo.io/oauth/revoke_token/`\n\nsending the following parameters in the body using the \"application/x-www-form-urlencoded\" format:\n```\n{\n token_type_hint = \"refresh_token\"\n client_id = $CLIENT_ID\n client_secret = $CLIENT_SECRET\n token = $REFRESH_TOKEN\n}\n```\n\n## API conventions\n### Identifying users\nThe Tempo REST API uses the Atlassian accountId to identify users. The accountId is an opaque identifier that \nuniquely identifies the user.\n\nThe accountId of the current user can found using the [Jira Myself API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-group-Myself).\n\nInformation about a user, given the accountId, can be retrieved using the [Jira User API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-group-User).\n\n### Dates\nThe API uses strings to represent dates. Dates are formatted as [ISO 8601 calendar dates](https://en.wikipedia.org/wiki/ISO_8601#Calendar_dates) (YYYY-MM-DD). \nFor example, March 29th, 2019 is formatted as 2019-03-29.\n\n### Delete requests\nOn success, delete requests return a response with status code [204 (No content)](https://httpstatuses.com/204). \nNo payload body is included in the response.\n\n### Arrays\nA few endpoints accept query parameters of type array. That is achieved by repeating the parameter multiple \ntimes, e.g. to get worklogs from three projects:\n\n`.../worklogs?from=2020-01-01&to=2020-12-31&project=10100&project=10200&project=10300`\n\n## Errors\n\nThe API uses standard HTTP status codes to indicate the success or failure of the API call.\n\nHere are a list of different types of error responses\n\nStatus code | Description | Content type\n----------------|-------------|---------\n400 | Bad Request | application/json\n401 | Unauthorized | text/html\n403 | Forbidden | text/html\n404 | Not Found | application/json\n\n
\n\nThe body of the JSON response will be in the following format:\n\n```\n{\n \"errors\": {\n \"message\": \"Error details\"\n }\n}\n```\n\nAn example of 400 error\n```\n {\n \"errors\": {\n \"message\": \"'date' must be valid on the format: 'yyyy-MM-dd'\"\n }\n }\n```\n\nAn example of 404 error\n```\n {\n \"errors\": {\n \"message\": \"Account 'xyz' not found\"\n }\n }\n```\n", + "termsOfService": "https://www.tempo.io/terms-of-use", + "title": "REST API documentation", + "version": "4.0", + "x-logo": { + "altText": "Tempo Software", + "href": "https://tempo.io/", + "url": "https://www.tempo.io/hubfs/Tempo%20Logo%20Full%20512px-1.svg" + } + }, + "servers": [ + { + "url": "https://api.tempo.io/4" + } + ], + "tags": [ + { + "description": "Accounts operations", + "name": "Accounts" + }, + { + "description": "Account categories operations", + "name": "Account - Categories" + }, + { + "description": "Account category type operations", + "name": "Account - Category-Types" + }, + { + "description": "Account link operations", + "name": "Account - Links" + }, + { + "description": "Customer related operations", + "name": "Customers" + }, + { + "description": "Generic resource related operations", + "name": "Generic Resources" + }, + { + "description": "Generic Resource Team Member operations", + "name": "Generic Resource Team Members" + }, + { + "description": "Global configuration related operations", + "name": "Global Configurations" + }, + { + "description": "Holiday operations", + "name": "Holiday Schemes" + }, + { + "description": "Period related operations", + "name": "Periods" + }, + { + "description": "Permission role related operations", + "name": "Permission Roles" + }, + { + "description": "Plan operations", + "name": "Plans" + }, + { + "description": "Program operations", + "name": "Program" + }, + { + "description": "Roles operations", + "name": "Roles" + }, + { + "description": "Skills operations", + "name": "Skills" + }, + { + "description": "Skill assignment operations", + "name": "Skill Assignments" + }, + { + "description": "Team operations", + "name": "Team" + }, + { + "description": "Team link operations", + "name": "Team Links" + }, + { + "description": "Team membership operations", + "name": "Team Memberships" + }, + { + "description": "Timesheet Approvals operations", + "name": "Timesheet Approvals" + }, + { + "description": "User Schedule operations", + "name": "User Schedule" + }, + { + "description": "Work Attributes operations", + "name": "Work Attributes" + }, + { + "description": "Workload Schemes operations", + "name": "Workload Schemes" + }, + { + "description": "Worklogs operations", + "name": "Worklogs" + } + ], + "paths": { + "/account-categories": { + "get": { + "description": "Retrieves a Category for the given id, or retrieves a list of all Categories if id is not provided. If the Category with the given id is not found, an empty list is returned", + "operationId": "getCategories", + "parameters": [ + { + "in": "query", + "name": "id", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CategoryResults" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Category / Retrieve all Categories", + "tags": [ + "Account - Categories" + ] + }, + "post": { + "description": "Creates a new Category using the provided input and returns the newly created Category", + "operationId": "createCategory", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CategoryInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Category" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Category cannot be created due to invalid request" + } + }, + "summary": "Create Category", + "tags": [ + "Account - Categories" + ] + } + }, + "/account-categories/{key}": { + "delete": { + "description": "Deletes the Category for the given key", + "operationId": "deleteCategory", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "SUCCESS" + }, + "400": { + "description": "Category cannot be deleted due to invalid request" + }, + "404": { + "description": "Category not found" + } + }, + "summary": "Delete Category", + "tags": [ + "Account - Categories" + ] + }, + "get": { + "description": "Retrieves an existing Category for the given key", + "operationId": "getCategoryByKey", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Category" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Category cannot be retrieved due to invalid request" + }, + "404": { + "description": "Category not found" + } + }, + "summary": "Retrieve Category", + "tags": [ + "Account - Categories" + ] + }, + "put": { + "description": "Updates the Category for the given key using the provided input and returns the updated Category", + "operationId": "updateCategory", + "parameters": [ + { + "description": "A set of characters that uniquely identify the category to be updated", + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CategoryInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Category" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Category cannot be updated due to invalid request" + }, + "404": { + "description": "Category not found" + } + }, + "summary": "Update Category", + "tags": [ + "Account - Categories" + ] + } + }, + "/account-category-types": { + "get": { + "description": "Retrieves a list of all Category Types", + "operationId": "getTypes", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CategoryTypeResults" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Category Types", + "tags": [ + "Account - Category-Types" + ] + } + }, + "/account-links": { + "post": { + "description": "Creates a new Account Link using the provided input and returns the newly created Account Link", + "operationId": "createLink", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountLinkInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountLink" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Account-link cannot be created for some reason" + }, + "404": { + "description": "Account not found" + } + }, + "summary": "Create Account Link", + "tags": [ + "Account - Links" + ] + } + }, + "/account-links/project/{id}": { + "get": { + "description": "Retrieves an existing Account Link for the given Project id", + "operationId": "getLinksByProject", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "includeGlobalAccounts", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountLinkResults" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Account Link by Project", + "tags": [ + "Account - Links" + ] + } + }, + "/account-links/{id}": { + "delete": { + "description": "Deletes an existing Account Link for the given id", + "operationId": "deleteLink", + "parameters": [ + { + "description": "An integer uniquely identifying the `AccountLink`", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "204": { + "description": "SUCCESS" + }, + "404": { + "description": "Link not found" + } + }, + "summary": "Delete Account Link", + "tags": [ + "Account - Links" + ] + }, + "get": { + "description": "Retrieves an existing Account Link for the given id", + "operationId": "getLink", + "parameters": [ + { + "description": "An integer uniquely identifying the `AccountLink`", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountLink" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Link not found" + } + }, + "summary": "Retrieve Account Link", + "tags": [ + "Account - Links" + ] + } + }, + "/account-links/{id}/make-default": { + "patch": { + "description": "Sets an existing Account Link as the default for the project", + "operationId": "patchLink", + "parameters": [ + { + "description": "An integer uniquely identifying the `AccountLink`", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "204": { + "description": "SUCCESS" + }, + "404": { + "description": "Link not found" + } + }, + "summary": "Set the Link as default for the project", + "tags": [ + "Account - Links" + ] + } + }, + "/accounts": { + "get": { + "description": "Retrieves a list of OPEN and CLOSED Accounts", + "operationId": "getAccounts", + "parameters": [ + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableAccount" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Accounts", + "tags": [ + "Accounts" + ] + }, + "post": { + "description": "Creates a new Account using the provided input and returns the newly created Account", + "operationId": "createAccount", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Account" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Account with this key already exists" + }, + "404": { + "description": "User is invalid" + } + }, + "summary": "Create new Account", + "tags": [ + "Accounts" + ] + } + }, + "/accounts/search": { + "post": { + "description": "Retrieves a list of existing Accounts that matches the given search parameters", + "operationId": "searchAccounts", + "parameters": [ + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountSearchInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableAccount" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Search Accounts", + "tags": [ + "Accounts" + ] + } + }, + "/accounts/{id}": { + "get": { + "description": "Retrieves an existing Account for the given id", + "operationId": "getAccountById", + "parameters": [ + { + "description": "An integer uniquely identifies the Account", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Account" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Account", + "tags": [ + "Accounts" + ] + } + }, + "/accounts/{key}": { + "delete": { + "description": "Deletes an existing Account for the given key", + "operationId": "deleteAccount", + "parameters": [ + { + "description": "A set of character that uniquely identify the Account", + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "SUCCESS" + } + }, + "summary": "Delete Account", + "tags": [ + "Accounts" + ] + }, + "put": { + "description": "Updates an existing Account for the given key using the provided input and returns the updated Account", + "operationId": "updateAccount", + "parameters": [ + { + "description": "A set of character that uniquely identify the account to be updated", + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Account" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Update Account", + "tags": [ + "Accounts" + ] + } + }, + "/accounts/{key}/links": { + "get": { + "description": "Retrieves a list of all existing links associated to the provided Account", + "operationId": "getAccountLinks", + "parameters": [ + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + }, + { + "description": "A set of character that uniquely identify the Account", + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableAccountLink" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Account links", + "tags": [ + "Accounts" + ] + } + }, + "/customers": { + "get": { + "description": "Retrieves a list of all Customers", + "operationId": "getCustomers", + "parameters": [ + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableCustomer" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve all Customers", + "tags": [ + "Customers" + ] + }, + "post": { + "description": "Creates a new Customer using the provided input and returns the newly created Customer", + "operationId": "createCustomer", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Customer cannot be created due to invalid request" + } + }, + "summary": "Create Customer", + "tags": [ + "Customers" + ] + } + }, + "/customers/{id}": { + "get": { + "description": "Retrieves an existing Customer for the given id", + "operationId": "getCustomerById", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Customer not found" + } + }, + "summary": "Retrieve Customer", + "tags": [ + "Customers" + ] + } + }, + "/customers/{id}/accounts": { + "get": { + "description": "Retrieves a list of Accounts associated with the given Customer", + "operationId": "getCustomerAccounts", + "parameters": [ + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + }, + { + "description": "An integer uniquely identifying the customer", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableAccount" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Accounts associated with customer cannot be retrieved due to invalid request" + }, + "404": { + "description": "Customer not found" + } + }, + "summary": "Retrieve Accounts associated with the Customer", + "tags": [ + "Customers" + ] + } + }, + "/customers/{key}": { + "delete": { + "description": "Deletes the Customer with the given key", + "operationId": "deleteCustomer", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "SUCCESS" + }, + "400": { + "description": "Customer cannot be deleted due to invalid request" + }, + "404": { + "description": "Customer not found" + } + }, + "summary": "Delete Customer", + "tags": [ + "Customers" + ] + }, + "put": { + "description": "Updates the Customer with the given key using the provided input and returns the updated Customer", + "operationId": "updateCustomer", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Customer cannot be updated due to invalid request" + }, + "404": { + "description": "Customer not found" + } + }, + "summary": "Update Customer", + "tags": [ + "Customers" + ] + } + }, + "/generic-resources": { + "post": { + "description": "Creates a new Generic Resource using the provided input and returns the newly created Generic Resource", + "operationId": "createGenericResource", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenericResourceInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenericResource" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Generic resource cannot be created due to invalid request" + } + }, + "summary": "Create Generic Resource", + "tags": [ + "Generic Resources" + ] + } + }, + "/generic-resources/search": { + "post": { + "description": "Retrieves a list of existing Generic Resources that matches the search parameters", + "operationId": "searchGenericResources", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenericResourceSearchInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableGenericResourceWithoutSelfLink" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Search Generic Resources", + "tags": [ + "Generic Resources" + ] + } + }, + "/generic-resources/{id}": { + "delete": { + "description": "Deletes an existing Generic Resource for the given id", + "operationId": "deleteGenericResource", + "parameters": [ + { + "description": "An id that uniquely identifies the Generic Resource", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "204": { + "description": "SUCCESS" + }, + "404": { + "description": "Generic resource not found" + } + }, + "summary": "Delete Generic Resource", + "tags": [ + "Generic Resources" + ] + }, + "get": { + "description": "Retrieves an existing Generic Resource for the given id", + "operationId": "getGenericResource", + "parameters": [ + { + "description": "An id that uniquely identifies the Generic Resource", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenericResource" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Generic resource not found" + } + }, + "summary": "Retrieve Generic Resource", + "tags": [ + "Generic Resources" + ] + }, + "put": { + "description": "Updates an existing Generic Resource for the given id using the provided input and returns the updated Generic Resource", + "operationId": "editGenericResource", + "parameters": [ + { + "description": "An id that uniquely identifies the Generic Resource", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenericResourceInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenericResource" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Generic resource cannot be updated due to invalid request" + }, + "404": { + "description": "Generic resource not found" + } + }, + "summary": "Update Generic Resource", + "tags": [ + "Generic Resources" + ] + } + }, + "/globalconfiguration": { + "get": { + "description": "Retrieves the Global Configurations", + "operationId": "getGlobalConfiguration", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GlobalConfiguration" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Global Configurations", + "tags": [ + "Global Configurations" + ] + } + }, + "/holiday-schemes": { + "get": { + "description": "List all holiday schemes", + "operationId": "getHolidaySchemes", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HolidaySchemeResults" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Get holiday schemes", + "tags": [ + "Holiday Schemes" + ] + }, + "post": { + "description": "Add holiday scheme of a given input", + "operationId": "createHolidayScheme", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HolidaySchemeInputBean" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HolidayScheme" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Holiday scheme cannot be created for some reasons." + } + }, + "summary": "Add holiday scheme", + "tags": [ + "Holiday Schemes" + ] + } + }, + "/holiday-schemes/users/{accountId}": { + "get": { + "description": "Get an user scheme with the given id", + "operationId": "getUserHolidayScheme", + "parameters": [ + { + "description": "A unique identifier of the user in Jira", + "in": "path", + "name": "accountId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HolidayScheme" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Get user scheme", + "tags": [ + "Holiday Schemes" + ] + } + }, + "/holiday-schemes/{schemeId}": { + "delete": { + "description": "Delete a holiday scheme with the given id", + "operationId": "deleteHolidayScheme", + "parameters": [ + { + "description": "The id of the Scheme", + "in": "path", + "name": "schemeId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "SUCCESS" + }, + "400": { + "description": "Holiday scheme cannot be deleted for some reasons." + }, + "404": { + "description": "Holiday scheme cannot be found in the system" + } + }, + "summary": "Delete a holiday scheme", + "tags": [ + "Holiday Schemes" + ] + }, + "get": { + "description": "Get Holiday scheme of a given scheme id", + "operationId": "getHolidayScheme", + "parameters": [ + { + "description": "The id of the Scheme", + "in": "path", + "name": "schemeId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HolidayScheme" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Holiday scheme cannot be found in the system" + } + }, + "summary": "Get holiday scheme", + "tags": [ + "Holiday Schemes" + ] + }, + "put": { + "description": "Update a holiday scheme with the given id using the provided input", + "operationId": "updateHolidayScheme", + "parameters": [ + { + "description": "The id of the Scheme", + "in": "path", + "name": "schemeId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HolidaySchemeInputBean" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HolidayScheme" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Holiday scheme cannot be updated for some reasons." + }, + "404": { + "description": "Holiday scheme cannot be found in the system" + } + }, + "summary": "Update a holiday scheme", + "tags": [ + "Holiday Schemes" + ] + } + }, + "/holiday-schemes/{schemeId}/default": { + "put": { + "description": "Set the default holiday scheme", + "operationId": "setDefaultScheme", + "parameters": [ + { + "description": "The id of the Scheme", + "in": "path", + "name": "schemeId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HolidayScheme" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Holiday scheme cannot be found in the system" + } + }, + "summary": "Set the default holiday scheme", + "tags": [ + "Holiday Schemes" + ] + } + }, + "/holiday-schemes/{schemeId}/holidays": { + "get": { + "description": "List all holidays of a given scheme and year", + "operationId": "getHolidays", + "parameters": [ + { + "description": "The id of the Scheme", + "in": "path", + "name": "schemeId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Year for holidays to be retrieved for. Returns holidays for current year if omitted.", + "in": "query", + "name": "year", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HolidayResults" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Holiday scheme cannot be found in the system" + } + }, + "summary": "Get holidays", + "tags": [ + "Holiday Schemes" + ] + }, + "post": { + "description": "Add a holiday using the provided input", + "operationId": "createHoliday", + "parameters": [ + { + "description": "The id of the Scheme", + "in": "path", + "name": "schemeId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HolidayInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Holiday" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Holiday cannot be created for some reasons" + } + }, + "summary": "Add holiday", + "tags": [ + "Holiday Schemes" + ] + } + }, + "/holiday-schemes/{schemeId}/holidays/floating": { + "get": { + "description": "List all floating holidays of a given scheme", + "operationId": "getFloatingHolidays", + "parameters": [ + { + "description": "The id of the Scheme", + "in": "path", + "name": "schemeId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HolidayResults" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Holiday scheme cannot be found in the system" + } + }, + "summary": "Get floating holidays", + "tags": [ + "Holiday Schemes" + ] + } + }, + "/holiday-schemes/{schemeId}/holidays/{holidayId}": { + "delete": { + "description": "Delete a holiday with the given id", + "operationId": "deleteHoliday", + "parameters": [ + { + "description": "The id of the Scheme", + "in": "path", + "name": "schemeId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The id of the holiday", + "in": "path", + "name": "holidayId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "SUCCESS" + }, + "404": { + "description": "Holiday cannot be found in the system" + } + }, + "summary": "Delete holiday", + "tags": [ + "Holiday Schemes" + ] + }, + "get": { + "description": "Get holiday information", + "operationId": "getHoliday", + "parameters": [ + { + "description": "The id of the holiday scheme", + "in": "path", + "name": "schemeId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The id of the holiday", + "in": "path", + "name": "holidayId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Holiday" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Holiday scheme cannot be found in the system" + } + }, + "summary": "Get holiday", + "tags": [ + "Holiday Schemes" + ] + }, + "put": { + "description": "Update a holiday with the given id using the provided input", + "operationId": "updateHoliday", + "parameters": [ + { + "description": "The id of the Scheme", + "in": "path", + "name": "schemeId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The id of the holiday", + "in": "path", + "name": "holidayId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HolidayInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Holiday" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Holiday cannot be created for some reasons" + }, + "404": { + "description": "Holiday cannot be found in the system" + } + }, + "summary": "Update a holiday", + "tags": [ + "Holiday Schemes" + ] + } + }, + "/holiday-schemes/{schemeId}/members": { + "get": { + "description": "Get holiday scheme members with the given id", + "operationId": "getWorkloadSchemeMembers", + "parameters": [ + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + }, + { + "description": "The id of the Scheme", + "in": "path", + "name": "schemeId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableUser" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Holiday scheme cannot be found in the system" + } + }, + "summary": "Get members in a holiday scheme", + "tags": [ + "Holiday Schemes" + ] + }, + "post": { + "description": "Assign a holiday scheme with the given id to members using the provided input", + "operationId": "setWorkloadSchemeMembership", + "parameters": [ + { + "description": "The id of the Scheme", + "in": "path", + "name": "schemeId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HolidaySchemeMembersInput" + } + } + } + }, + "responses": { + "204": { + "description": "Users have been successfully added to the holiday scheme" + }, + "400": { + "description": "Holiday scheme membership cannot be updated for some reasons." + }, + "404": { + "description": "Holiday scheme cannot be found in the system" + } + }, + "summary": "Set holiday scheme to members", + "tags": [ + "Holiday Schemes" + ] + } + }, + "/periods": { + "get": { + "description": "Retrieves a list of all Periods for the given date range", + "operationId": "getPeriods", + "parameters": [ + { + "description": "The start date in format yyyy-mm-dd", + "in": "query", + "name": "from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The end date in format yyyy-mm-dd", + "in": "query", + "name": "to", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimesheetApprovalPeriodsBean" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Periods", + "tags": [ + "Periods" + ] + } + }, + "/permission-roles": { + "get": { + "description": "Retrieves a list of the Permission Roles for a given Team if ID is informed, or retrieves a list of all Permission Roles", + "operationId": "getPermissionRoles", + "parameters": [ + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + }, + { + "description": "An ID that uniquely identifies the Team for which you want to retrieve Permissions", + "in": "query", + "name": "teamId", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageablePermissionRole" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Permission Roles", + "tags": [ + "Permission Roles" + ] + }, + "post": { + "description": "Creates a new editable Permission Role using the provided input and returns the newly created Permission Role", + "operationId": "createPermissionGroup", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionRoleInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionRole" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Team with specified id does not exist." + } + }, + "summary": "Create Permission Role", + "tags": [ + "Permission Roles" + ] + } + }, + "/permission-roles/global": { + "get": { + "description": "Retrieves the Global Permission Roles", + "operationId": "getGlobalPermissionRoles", + "parameters": [ + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageablePermissionRole" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Global Permission Roles", + "tags": [ + "Permission Roles" + ] + } + }, + "/permission-roles/{id}": { + "delete": { + "description": "Deletes an editable Permission Role.", + "operationId": "deleteEditablePermissionGroup", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "204": { + "description": "SUCCESS" + }, + "404": { + "description": "Permission role cannot be found in the system." + } + }, + "summary": "Delete Permission Role", + "tags": [ + "Permission Roles" + ] + }, + "get": { + "description": "Retrieves a Permission Role for the given id", + "operationId": "getPermissionRole", + "parameters": [ + { + "description": "ID of the permission role", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionRole" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Permission role cannot be found in the system." + } + }, + "summary": "Retrieve Permission Role", + "tags": [ + "Permission Roles" + ] + }, + "put": { + "description": "Updates a Permission Role for the given id using the provided input and returns the updated Permission Role. Only editable roles can be updated.", + "operationId": "updatePermissionGroup", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionRoleInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PermissionRole" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Team with specified id does not exist." + }, + "404": { + "description": "Permission role cannot be found in the system." + } + }, + "summary": "Update Permission Role", + "tags": [ + "Permission Roles" + ] + } + }, + "/plans": { + "get": { + "description": "Retrieves a list of existing Plans (Resource Allocations) that matches the given search parameters", + "operationId": "getPlans", + "parameters": [ + { + "description": "Ids of the user assignees you want to search plans for.", + "in": "query", + "name": "accountIds", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "description": "Types of the assignees you want to search plans for.", + "in": "query", + "name": "assigneeTypes", + "schema": { + "type": "array", + "enum": [ + "USER", + "GENERIC" + ], + "items": { + "type": "string", + "enum": [ + "USER", + "GENERIC" + ] + } + } + }, + { + "description": "Retrieve plans starting with this date.", + "in": "query", + "name": "from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Ids of the generic resources you want to search plans for.", + "in": "query", + "name": "genericResourceIds", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + { + "description": "Maximum number of results on each page.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "maximum": 5000 + } + }, + { + "description": "Number of skipped results.", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "description": "Ids of the plans you want to search for.", + "in": "query", + "name": "planIds", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + { + "description": "Ids of the items you want to search plans for.", + "in": "query", + "name": "planItemIds", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + { + "description": "Types of the items you want to search plans for.", + "in": "query", + "name": "planItemTypes", + "schema": { + "type": "array", + "enum": [ + "ISSUE", + "PROJECT" + ], + "items": { + "type": "string", + "enum": [ + "ISSUE", + "PROJECT" + ] + } + } + }, + { + "description": "Defines how detailed you would like to see the breakdown of the planned time for each `Plan`.", + "in": "query", + "name": "plannedTimeBreakdown", + "schema": { + "type": "array", + "enum": [ + "DAILY", + "PERIOD" + ], + "items": { + "type": "string", + "enum": [ + "DAILY", + "PERIOD" + ] + } + } + }, + { + "description": "Retrieve plans that ends up to and including this date.", + "in": "query", + "name": "to", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve plans that have been updated from this date.", + "in": "query", + "name": "updatedFrom", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageablePlan" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Plans", + "tags": [ + "Plans" + ] + }, + "post": { + "description": "Creates a new Plan (Resource Allocation) using the provided input and returns the newly created Plan", + "operationId": "createPlan", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Plan" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Plan cannot be created due to invalid request" + } + }, + "summary": "Create Plan", + "tags": [ + "Plans" + ] + } + }, + "/plans/generic-resource/{genericResourceId}": { + "get": { + "description": "Retrieves a list of existing Plans (Resource Allocations) for the given Generic Resource", + "operationId": "getPlansForGenericResource", + "parameters": [ + { + "description": "Id of the generic resource you want to search plans for", + "in": "path", + "name": "genericResourceId", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "description": "Defines how detailed you would like to see the breakdown of the planned time for each plan.You can add one or both of these values as query params [DAILY, PERIOD] to see more detailed breakdown of planned time.", + "in": "query", + "name": "plannedTimeBreakdown", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "description": "Retrieve plans starting with this date", + "in": "query", + "name": "from", + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve plans that ends up to and including this date", + "in": "query", + "name": "to", + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve plans that have been updated from this date", + "in": "query", + "name": "updatedFrom", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanResults" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Plans (Resource Allocations) for Generic Resource", + "tags": [ + "Plans" + ] + } + }, + "/plans/search": { + "post": { + "description": "Retrieves a list of existing Plans (Resource Allocations) that matches the given search parameters", + "operationId": "searchPlans", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanSearchInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageablePlanBeanWithoutLinks" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Search Plans", + "tags": [ + "Plans" + ] + } + }, + "/plans/user/{accountId}": { + "get": { + "description": "Retrieves a list of Plans (Resource Allocations) for the given User", + "operationId": "getPlansForUser", + "parameters": [ + { + "description": "Id of the user you want to search plans for", + "in": "path", + "name": "accountId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Defines how detailed you would like to see the breakdown of the planned time for each plan.You can add one or both of these values as query params [DAILY, PERIOD] to see more detailed breakdown of planned time.", + "in": "query", + "name": "plannedTimeBreakdown", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "description": "Retrieve plans starting with this date", + "in": "query", + "name": "from", + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve plans that ends up to and including this date", + "in": "query", + "name": "to", + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve plans that have been updated from this date", + "in": "query", + "name": "updatedFrom", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanResults" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Plans (Resource Allocations) for User", + "tags": [ + "Plans" + ] + } + }, + "/plans/{id}": { + "delete": { + "description": "Deletes an existing Plan (Resource Allocation) for the given id", + "operationId": "deletePlanById", + "parameters": [ + { + "description": "An id that uniquely identifies the Plan", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "204": { + "description": "SUCCESS" + }, + "404": { + "description": "Plan not found" + } + }, + "summary": "Delete Plan", + "tags": [ + "Plans" + ] + }, + "get": { + "description": "Retrieves an existing Plan (Resource Allocation) for the given id", + "operationId": "getPlanById", + "parameters": [ + { + "description": "An id that uniquely identifies the Plan", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "in": "query", + "name": "from", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "to", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Plan" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Plan not found" + } + }, + "summary": "Retrieve Plan", + "tags": [ + "Plans" + ] + }, + "put": { + "description": "Updates an existing Plan (Resource Allocation) for the given id using the provided input and returns the updated Plan", + "operationId": "updatePlan", + "parameters": [ + { + "description": "An id that uniquely identifies the Plan", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlanInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Plan" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Plan cannot be updated due to invalid request" + }, + "404": { + "description": "Plan not found" + } + }, + "summary": "Update Plan", + "tags": [ + "Plans" + ] + } + }, + "/programs": { + "get": { + "description": "Retrieves a list of all Programs", + "operationId": "getPrograms", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProgramResults" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve all Programs", + "tags": [ + "Program" + ] + }, + "post": { + "description": "Creates a new Program using the provided input and returns the newly created Program", + "operationId": "createProgram", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProgramInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Program" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Program cannot be created due to invalid request" + } + }, + "summary": "Create Program", + "tags": [ + "Program" + ] + } + }, + "/programs/{id}": { + "delete": { + "description": "Deletes an existing Program for the given id", + "operationId": "deleteProgram", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "SUCCESS" + }, + "400": { + "description": "Program cannot be deleted due to invalid request" + }, + "404": { + "description": "Program not found" + } + }, + "summary": "Delete Program", + "tags": [ + "Program" + ] + }, + "get": { + "description": "Retrieves an existing Program for the given id", + "operationId": "getProgramById", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Program" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Program not found" + } + }, + "summary": "Retrieve Program", + "tags": [ + "Program" + ] + }, + "put": { + "description": "Updates an existing Program for the given id using the provided input and returns the updated Program", + "operationId": "updateProgram", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProgramInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Program" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Program cannot be updated due to invalid request" + }, + "404": { + "description": "Program not found" + } + }, + "summary": "Update Program", + "tags": [ + "Program" + ] + } + }, + "/programs/{id}/teams": { + "get": { + "description": "Retrieves a list of Teams associated with the given Program", + "operationId": "getTeamsByProgramId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamRefResults" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Team associated with program cannot be retrieved due to invalid request" + }, + "404": { + "description": "Team not found" + } + }, + "summary": "Retrieve Teams associated with Program", + "tags": [ + "Program" + ] + } + }, + "/roles": { + "get": { + "description": "Retrieves a list of all Roles", + "operationId": "getAllRoles", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleResults" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Roles", + "tags": [ + "Roles" + ] + }, + "post": { + "description": "Creates a new Role and returns the newly created Role", + "operationId": "createRole", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Role cannot be created because the name already exists" + } + }, + "summary": "Create new Role", + "tags": [ + "Roles" + ] + } + }, + "/roles/default": { + "get": { + "description": "Retrieves the default Role", + "operationId": "getDefaultRole", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve default Role", + "tags": [ + "Roles" + ] + } + }, + "/roles/{id}": { + "delete": { + "description": "Deletes an existing Role for the given id", + "operationId": "deleteRole", + "parameters": [ + { + "description": "An id that uniquely identifies the Role", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Role has been successfully deleted" + } + }, + "summary": "Delete Role", + "tags": [ + "Roles" + ] + }, + "get": { + "description": "Retrieves an existing Role for the given id", + "operationId": "getRoleById", + "parameters": [ + { + "description": "An id that uniquely identifies the Role", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Role cannot be found in the system" + } + }, + "summary": "Retrieve Role by id", + "tags": [ + "Roles" + ] + }, + "put": { + "description": "Updates an existing Role for the given id with the given parameters", + "operationId": "updateRole", + "parameters": [ + { + "description": "An id that uniquely identifies the Role", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RoleInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Role cannot be updated because the name already exists" + } + }, + "summary": "Update Role", + "tags": [ + "Roles" + ] + } + }, + "/skill-assignments": { + "post": { + "description": "Assigns a list of Skills for the given Resource using the provided input and returns a list of the Resource's assigned Skills. A Resource can have up to 5 Skills assigned.", + "operationId": "assignSkills", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SkillsAssignmentInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Skill" + } + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Skill cannot be assigned due to invalid request" + } + }, + "summary": "Assign Skills for Resource", + "tags": [ + "Skill Assignments" + ] + } + }, + "/skill-assignments/replace": { + "post": { + "description": "Replaces Skills for the given Resource using the provided input and returns a list of the Resource's assigned Skills. A Resource can have up to 5 skills assigned.", + "operationId": "replaceSkillAssignments", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SkillsAssignmentInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Skill" + } + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Skill cannot be replaced due to invalid request" + } + }, + "summary": "Replace skills for Resource", + "tags": [ + "Skill Assignments" + ] + } + }, + "/skill-assignments/{assigneeId}/{assigneeType}": { + "get": { + "description": "Retrieves a list of Skill Assignments for the given Resource", + "operationId": "getSkillAssignments", + "parameters": [ + { + "description": "A string that uniquely identifies the resource", + "in": "path", + "name": "assigneeId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "A string that identifies the resource type, which can be USER or GENERIC", + "in": "path", + "name": "assigneeType", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Skill" + } + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Skill cannot be found due to invalid request" + } + }, + "summary": "Retrieve Skill Assignments for Resource", + "tags": [ + "Skill Assignments" + ] + } + }, + "/skill-assignments/{assigneeId}/{assigneeType}/{skillId}": { + "delete": { + "description": "Deletes an existing Skill for the given Resource", + "operationId": "removeSkillAssignment", + "parameters": [ + { + "description": "A string that uniquely identifies the resource", + "in": "path", + "name": "assigneeId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "A string that identifies the resource type, which can be USER or GENERIC", + "in": "path", + "name": "assigneeType", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "An id that uniquely identify the Skill", + "in": "path", + "name": "skillId", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "204": { + "description": "SUCCESS" + } + }, + "summary": "Delete skill of the Resource", + "tags": [ + "Skill Assignments" + ] + } + }, + "/skills": { + "get": { + "description": "Retrieves a list of existing Skills that matches the given search parameters", + "operationId": "getSkills", + "parameters": [ + { + "description": "Ids of the Skills you want to retrieve", + "in": "query", + "name": "id", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + { + "description": "A query to be used for string matching against name of Skills", + "in": "query", + "name": "query", + "schema": { + "type": "string" + } + }, + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableSkill" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Skills", + "tags": [ + "Skills" + ] + }, + "post": { + "description": "Creates a new Skill using the provided input and returns the newly created Skill", + "operationId": "createSkill", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SkillInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Skill" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Skill cannot be created due to invalid request" + } + }, + "summary": "Create Skill", + "tags": [ + "Skills" + ] + } + }, + "/skills/{id}": { + "delete": { + "description": "Deletes an existing Skill for the given id", + "operationId": "deleteSkill", + "parameters": [ + { + "description": "An id that uniquely identifies the Skill", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "204": { + "description": "SUCCESS" + }, + "404": { + "description": "Skill not found" + } + }, + "summary": "Delete Skill", + "tags": [ + "Skills" + ] + }, + "get": { + "description": "Retrieves an existing Skill for the given id", + "operationId": "getSkill", + "parameters": [ + { + "description": "An id that uniquely identifies the Skill", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Skill" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Skill not found" + } + }, + "summary": "Retrieve Skill", + "tags": [ + "Skills" + ] + }, + "put": { + "description": "Updates an existing Skill for the given id using the provided input and returns the updated Skill", + "operationId": "updateSkill", + "parameters": [ + { + "description": "An id that uniquely identifies the Skill", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SkillInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Skill" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Skill cannot be updated due to invalid request" + }, + "404": { + "description": "Skill not found" + } + }, + "summary": "Update Skill", + "tags": [ + "Skills" + ] + } + }, + "/team-links": { + "post": { + "description": "Creates a new Team Link using the provided input and returns the newly created Team Link", + "operationId": "createTeamLink", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamLinkInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamLink" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Team-link cannot be created for some reasons" + } + }, + "summary": "Create Team Link", + "tags": [ + "Team Links" + ] + } + }, + "/team-links/project/{id}": { + "get": { + "description": "Retrieves an existing Team Link for the given Project id", + "operationId": "getTeamLinkByProjectId", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamLinkResults" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Team Link by Project", + "tags": [ + "Team Links" + ] + } + }, + "/team-links/{linkId}": { + "delete": { + "description": "Deletes an existing Team Link for the given id", + "operationId": "deleteTeamLink", + "parameters": [ + { + "in": "path", + "name": "linkId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Team-link has been successfully deleted" + }, + "404": { + "description": "Team-link cannot be found in the system" + } + }, + "summary": "Delete Team Link", + "tags": [ + "Team Links" + ] + }, + "get": { + "description": "Retrieves an existing Team Link for the given id", + "operationId": "getTeamLink", + "parameters": [ + { + "in": "path", + "name": "linkId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamLink" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Team-link cannot be found in the system" + } + }, + "summary": "Retrieve Team Link", + "tags": [ + "Team Links" + ] + } + }, + "/team-memberships": { + "post": { + "description": "Creates a new Membership using the provided input and returns the newly created Membership", + "operationId": "createMembership", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamMembershipInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamMembership" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Membership cannot be created for some reasons" + } + }, + "summary": "Create Membership", + "tags": [ + "Team Memberships" + ] + } + }, + "/team-memberships/team/{teamId}": { + "get": { + "description": "Retrieves a list of all the Memberships for the given Team", + "operationId": "getAllMemberships", + "parameters": [ + { + "in": "path", + "name": "teamId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamMembershipResults" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Team cannot be found in the system" + } + }, + "summary": "Retrieve Memberships for Team", + "tags": [ + "Team Memberships" + ] + } + }, + "/team-memberships/{id}": { + "delete": { + "description": "Deletes an existing Membership for the given id", + "operationId": "deleteMembership", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "SUCCESS" + }, + "404": { + "description": "Membership cannot be found in the system" + } + }, + "summary": "Delete Membership", + "tags": [ + "Team Memberships" + ] + }, + "get": { + "description": "Retrieves an existing Membership for the given id", + "operationId": "getMembership", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamMembership" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Membership cannot be found in the system" + } + }, + "summary": "Retrieve Membership", + "tags": [ + "Team Memberships" + ] + }, + "put": { + "description": "Updates an existing Membership using the provided input and returns the updated Membership", + "operationId": "updateMembership", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MembershipInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamMembership" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Membership cannot be updated for some reasons" + }, + "404": { + "description": "Membership cannot be found in the system" + } + }, + "summary": "Update Membership", + "tags": [ + "Team Memberships" + ] + } + }, + "/teams": { + "get": { + "description": "Retrieves a list of all existing Teams", + "operationId": "getTeams", + "parameters": [ + { + "description": "Skip over a number of elements by specifying an offset value for the query.", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + }, + { + "description": "Jira user account ids of the user team members you want to get teams for.", + "in": "query", + "name": "teamMembers", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableTeam" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Teams", + "tags": [ + "Team" + ] + }, + "post": { + "description": "Creates a new Team using the provided input and returns the newly created Team", + "operationId": "createTeam", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Team" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Team cannot be created for some reasons" + } + }, + "summary": "Create Team", + "tags": [ + "Team" + ] + } + }, + "/teams/{id}": { + "delete": { + "description": "Deletes the Team for the given id", + "operationId": "deleteTeam", + "parameters": [ + { + "description": "An id that uniquely identifies the Team.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "SUCCESS" + }, + "400": { + "description": "Team cannot be deleted due to invalid request" + }, + "404": { + "description": "Team not found" + } + }, + "summary": "Delete Team", + "tags": [ + "Team" + ] + }, + "get": { + "description": "Retrieves an existing Team for the given id", + "operationId": "getTeamById", + "parameters": [ + { + "description": "An id that uniquely identifies the Team.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Team" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Team not found." + } + }, + "summary": "Retrieve Team", + "tags": [ + "Team" + ] + }, + "put": { + "description": "Updates the Team for the given id using the provided input, and returns the updated Team", + "operationId": "updateTeam", + "parameters": [ + { + "description": "An id that uniquely identifies the Team.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TeamInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Team" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Team cannot be updated for some reasons" + }, + "404": { + "description": "Team cannot be found in the system" + } + }, + "summary": "Update Team", + "tags": [ + "Team" + ] + } + }, + "/teams/{id}/links": { + "get": { + "description": "Retrieves a list of all Links for the given Team", + "operationId": "getTeamLinks", + "parameters": [ + { + "description": "An id that uniquely identifies the Team.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Skip over a number of elements by specifying an offset value for the query.", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableTeamLink" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Team cannot be found in the system" + } + }, + "summary": "Retrieve Links from Team", + "tags": [ + "Team" + ] + } + }, + "/teams/{id}/members": { + "get": { + "description": "Retrieves a list of users with their active membership. Meaning that they are currently (today) members of this team via said membership", + "operationId": "getTeamMembers", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableMemberMemberships" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Team cannot be found in the system" + } + }, + "summary": "Retrieve active team members", + "tags": [ + "Team" + ] + } + }, + "/teams/{teamId}/generic-resources": { + "get": { + "description": "Retrieves a list of all Generic Resources that are members of the given Team", + "operationId": "getResourcesInTeam", + "parameters": [ + { + "description": "An id that uniquely identifies the Team from which generic resources are to be retrieved", + "in": "path", + "name": "teamId", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenericResourceTeamMembers" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Team not found" + } + }, + "summary": "Retrieve Generic Resources for Team", + "tags": [ + "Generic Resource Team Members" + ] + }, + "post": { + "description": "Adds Generic Resource to the given Team", + "operationId": "addResourceToTeam", + "parameters": [ + { + "description": "An id that uniquely identifies the Team which the generic resource is to be a member of", + "in": "path", + "name": "teamId", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenericResourceTeamMemberInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenericResourceTeamMember" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Generic resource cannot be added to team to invalid request" + }, + "404": { + "description": "Team not found" + } + }, + "summary": "Add Generic Resource to Team", + "tags": [ + "Generic Resource Team Members" + ] + } + }, + "/teams/{teamId}/generic-resources/{resourceId}": { + "delete": { + "description": "Deletes an existing Generic Resource from the given Team", + "operationId": "removeGenericResourceFromTeam", + "parameters": [ + { + "description": "An id that uniquely identifies the Team", + "in": "path", + "name": "teamId", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "description": "An id that uniquely identifies the Generic Resource", + "in": "path", + "name": "resourceId", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "204": { + "description": "SUCCESS" + }, + "404": { + "description": "Team not found" + } + }, + "summary": "Delete Generic Resource from Team", + "tags": [ + "Generic Resource Team Members" + ] + }, + "get": { + "description": "Retrieves an existing Generic Resource from the given Team", + "operationId": "getGenericResourceTeamMember", + "parameters": [ + { + "description": "An id that uniquely identifies the Team", + "in": "path", + "name": "teamId", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "description": "An id that uniquely identifies the Generic Resource", + "in": "path", + "name": "resourceId", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenericResourceTeamMember" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Team not found" + } + }, + "summary": "Retrieve Generic Resource for Team", + "tags": [ + "Generic Resource Team Members" + ] + } + }, + "/timesheet-approvals/team/{teamId}": { + "get": { + "description": "Retrieves the current Timesheet Approval for a Team in the given period", + "operationId": "getTimesheetApprovalForTeam", + "parameters": [ + { + "in": "path", + "name": "teamId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The Start Date in format yyyy-mm-dd", + "in": "query", + "name": "from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The End Date in format yyyy-mm-dd", + "in": "query", + "name": "to", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimesheetApprovalResults" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Team cannot be found in the system" + } + }, + "summary": "Retrieve Timesheet Approval for Team", + "tags": [ + "Timesheet Approvals" + ] + } + }, + "/timesheet-approvals/user/{accountId}": { + "get": { + "description": "Retrieves the current Timesheet approval for a User in the given period", + "operationId": "getTimesheetApprovalForUser", + "parameters": [ + { + "in": "path", + "name": "accountId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The Start Date in format yyyy-mm-dd", + "in": "query", + "name": "from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The End Date in format yyyy-mm-dd", + "in": "query", + "name": "to", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimesheetApproval" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Non valid date '2022-05-011': format must be yyyy-MM-dd" + }, + "404": { + "description": "User is invalid" + } + }, + "summary": "Retrieve current Timesheet approval", + "tags": [ + "Timesheet Approvals" + ] + } + }, + "/timesheet-approvals/user/{accountId}/approve": { + "post": { + "description": "Approves a Timesheet for the given User in the given period and returns the approved Timesheet", + "operationId": "approveTimesheetForUser", + "parameters": [ + { + "in": "path", + "name": "accountId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The Start Date in format yyyy-mm-dd", + "in": "query", + "name": "from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The End Date in format yyyy-mm-dd", + "in": "query", + "name": "to", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimesheetApprovalInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimesheetApproval" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Non valid date '2022-05-011': format must be yyyy-MM-dd" + }, + "404": { + "description": "User is invalid" + } + }, + "summary": "Approve Timesheet", + "tags": [ + "Timesheet Approvals" + ] + } + }, + "/timesheet-approvals/user/{accountId}/reject": { + "post": { + "description": "Rejects a Timesheet for the given User in the given period and returns the rejected Timesheet", + "operationId": "rejectTimesheetForUser", + "parameters": [ + { + "in": "path", + "name": "accountId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The Start Date in format yyyy-mm-dd", + "in": "query", + "name": "from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The End Date in format yyyy-mm-dd", + "in": "query", + "name": "to", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimesheetApprovalInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimesheetApproval" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Non valid date '2022-05-011': format must be yyyy-MM-dd" + }, + "404": { + "description": "User is invalid" + } + }, + "summary": "Reject Timesheet", + "tags": [ + "Timesheet Approvals" + ] + } + }, + "/timesheet-approvals/user/{accountId}/reopen": { + "post": { + "description": "Reopens a Timesheet for the given User in the given period and returns the reopened Timesheet", + "operationId": "reopenTimesheetForUser", + "parameters": [ + { + "in": "path", + "name": "accountId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The Start Date in format yyyy-mm-dd", + "in": "query", + "name": "from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The End Date in format yyyy-mm-dd", + "in": "query", + "name": "to", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimesheetApprovalInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimesheetApproval" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Non valid date '2022-05-011': format must be yyyy-MM-dd" + }, + "404": { + "description": "User is invalid" + } + }, + "summary": "Reopen Timesheet", + "tags": [ + "Timesheet Approvals" + ] + } + }, + "/timesheet-approvals/user/{accountId}/reviewers": { + "get": { + "description": "Retrieves a list of the Timesheet reviewers for the given User", + "operationId": "getTimesheetReviewersForUser", + "parameters": [ + { + "in": "path", + "name": "accountId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResults" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "User is invalid" + } + }, + "summary": "Retrieve Timesheet reviewers for User", + "tags": [ + "Timesheet Approvals" + ] + } + }, + "/timesheet-approvals/user/{accountId}/submit": { + "post": { + "description": "Submits a Timesheet for the given User in the given period and returns the submitted Timesheet", + "operationId": "submitTimesheetForUser", + "parameters": [ + { + "in": "path", + "name": "accountId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The Start Date in format yyyy-mm-dd", + "in": "query", + "name": "from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The End Date in format yyyy-mm-dd", + "in": "query", + "name": "to", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimesheetApprovalInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimesheetApproval" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Non valid date '2022-05-011': format must be yyyy-MM-dd" + }, + "404": { + "description": "User is invalid" + } + }, + "summary": "Submit Timesheet", + "tags": [ + "Timesheet Approvals" + ] + } + }, + "/timesheet-approvals/waiting": { + "get": { + "description": "Retrieves a list of all Timesheets waiting for approval", + "operationId": "getTimesheetApprovalsWaitingForApproval", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimesheetApprovalResults" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Timesheets waiting for approval", + "tags": [ + "Timesheet Approvals" + ] + } + }, + "/user-schedule": { + "get": { + "description": "Retrieves the Schedule of the logged-in User", + "operationId": "getAuthenticatedUserSchedule", + "parameters": [ + { + "description": "The start date in format yyyy-mm-dd", + "in": "query", + "name": "from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The end date in format yyyy-mm-dd", + "in": "query", + "name": "to", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DayScheduleResults" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve logged User Schedule", + "tags": [ + "User Schedule" + ] + } + }, + "/user-schedule/{accountId}": { + "get": { + "description": "Retrieves Schedule for the given User", + "operationId": "getUserSchedule", + "parameters": [ + { + "in": "path", + "name": "accountId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The start date in format yyyy-mm-dd", + "in": "query", + "name": "from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The end date in format yyyy-mm-dd", + "in": "query", + "name": "to", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DayScheduleResults" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve User Schedule", + "tags": [ + "User Schedule" + ] + } + }, + "/work-attributes": { + "get": { + "description": "Retrieves a list of all Work Attributes", + "operationId": "getWorkAttributes", + "parameters": [ + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableWorkAttribute" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Work Attributes", + "tags": [ + "Work Attributes" + ] + }, + "post": { + "description": "Creates a new Work Attribute using the provided input and returns the newly created Work Attribute", + "operationId": "createWorkAttributes", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateWorkAttributeInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkAttribute" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Work attribute cannot be created for some reasons" + } + }, + "summary": "Create Work Attribute", + "tags": [ + "Work Attributes" + ] + } + }, + "/work-attributes/{key}": { + "delete": { + "description": "Deletes an existing Work Attribute for the given key", + "operationId": "deleteWorkAttributeByKey", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "SUCCESS" + }, + "404": { + "description": "Work attribute cannot be found in the system" + } + }, + "summary": "Delete Work Attribute", + "tags": [ + "Work Attributes" + ] + }, + "get": { + "description": "Retrieves an existing Work Attribute for the given key", + "operationId": "getWorkAttributeByKey", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkAttribute" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Work attribute cannot be found in the system" + } + }, + "summary": "Retrieve Work Attribute", + "tags": [ + "Work Attributes" + ] + }, + "put": { + "description": "Updates an existing Work Attribute for the given key using the provided input and returns the updated Work Attribute", + "operationId": "updateWorkAttributeByKey", + "parameters": [ + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateWorkAttributeInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkAttribute" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Work attribute cannot be updated for some reasons" + }, + "404": { + "description": "Work attribute cannot be found in the system" + } + }, + "summary": "Update Work Attribute", + "tags": [ + "Work Attributes" + ] + } + }, + "/workload-schemes": { + "get": { + "description": "Retrieves a list of all Workload Schemes", + "operationId": "getWorkloadSchemes", + "parameters": [ + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableWorkloadScheme" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Workload scheme cannot be found in the system" + } + }, + "summary": "Retrieve Workload Schemes", + "tags": [ + "Workload Schemes" + ] + }, + "post": { + "description": "Creates a new Workload Scheme using the provided input and returns the newly created Workload Scheme", + "operationId": "createWorkloadScheme", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkloadSchemeInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkloadScheme" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Create Workload Scheme", + "tags": [ + "Workload Schemes" + ] + } + }, + "/workload-schemes/users/{accountId}": { + "get": { + "description": "Retrieves an existing Workload Scheme for the given User", + "operationId": "getUserWorkloadScheme", + "parameters": [ + { + "description": "A unique identifier of the user in Jira", + "in": "path", + "name": "accountId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkloadScheme" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Workload scheme cannot be found in the system" + } + }, + "summary": "Retrieve Workload Scheme for User", + "tags": [ + "Workload Schemes" + ] + } + }, + "/workload-schemes/{id}": { + "delete": { + "description": "Deletes a Workload Scheme for the given id", + "operationId": "deleteWorkloadScheme", + "parameters": [ + { + "description": "ID of the workload scheme", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Workload scheme been successfully deleted" + }, + "404": { + "description": "Workload scheme cannot be found in the system" + } + }, + "summary": "Delete Workload Scheme", + "tags": [ + "Workload Schemes" + ] + }, + "get": { + "description": "Retrieves an existing Workload Scheme for the given id", + "operationId": "getWorkloadSchemeById", + "parameters": [ + { + "description": "ID of the workload scheme", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkloadScheme" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Workload scheme cannot be found in the system" + } + }, + "summary": "Retrieve Workload Scheme", + "tags": [ + "Workload Schemes" + ] + }, + "put": { + "description": "Updates an existing Workload Scheme for the given id using the provided input and returns the updated Workload Scheme", + "operationId": "updateWorkloadScheme", + "parameters": [ + { + "description": "ID of the workload scheme", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkloadSchemeInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkloadScheme" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Workload scheme cannot be found in the system" + } + }, + "summary": "Update Workload Scheme", + "tags": [ + "Workload Schemes" + ] + } + }, + "/workload-schemes/{id}/default": { + "put": { + "description": "Sets the given Workload Scheme as default", + "operationId": "setDefaultWorkloadScheme", + "parameters": [ + { + "description": "ID of the workload scheme", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkloadScheme" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Workload scheme cannot be found in the system" + } + }, + "summary": "Set default Workload Scheme", + "tags": [ + "Workload Schemes" + ] + } + }, + "/workload-schemes/{id}/members": { + "get": { + "description": "Retrieves a list of all the Members for the given Workload Scheme", + "operationId": "getWorkloadSchemeMembers_1", + "parameters": [ + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + }, + { + "description": "ID of the workload scheme", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableUser" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Workload scheme cannot be found in the system" + } + }, + "summary": "Retrieve Members of Workload Scheme", + "tags": [ + "Workload Schemes" + ] + }, + "post": { + "description": "Adds a list of Users to the given Workload Scheme using the provided input", + "operationId": "setWorkloadSchemeForUsers", + "parameters": [ + { + "description": "ID of the workload scheme", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkloadSchemeMembersInput" + } + } + } + }, + "responses": { + "204": { + "description": "Users have been successfully added to the workload scheme" + }, + "404": { + "description": "Workload scheme cannot be found in the system" + } + }, + "summary": "Add Users to Workload Scheme", + "tags": [ + "Workload Schemes" + ] + } + }, + "/worklogs": { + "get": { + "description": "Retrieves a list of Worklogs that matches the given search parameters", + "operationId": "getWorklogs", + "parameters": [ + { + "description": "Retrieve only worklogs for the given project ids", + "in": "query", + "name": "projectId", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + { + "description": "Retrieve only worklogs for the given issue ids", + "in": "query", + "name": "issueId", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + { + "description": "Retrieve results starting with this date", + "in": "query", + "name": "from", + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve results up to and including this date", + "in": "query", + "name": "to", + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve results that have been updated from this date", + "in": "query", + "name": "updatedFrom", + "schema": { + "type": "string" + } + }, + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + }, + { + "description": "Order results by the specified field. If no order is specified, results will by default be ordered by START_DATE_TIME and ID", + "in": "query", + "name": "orderBy", + "schema": { + "type": "string", + "enum": [ + "ID", + "START_DATE_TIME", + "UPDATED" + ] + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableWorklog" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Authenticated user is missing permission to fulfill the request" + } + }, + "summary": "Retrieve Worklogs", + "tags": [ + "Worklogs" + ] + }, + "post": { + "description": "Creates a new Worklog using the provided input and returns the newly created Worklog", + "operationId": "createWorklog", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorklogInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Worklog" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Worklog cannot be created for some reasons" + } + }, + "summary": "Create Worklog", + "tags": [ + "Worklogs" + ] + } + }, + "/worklogs/account/{accountKey}": { + "get": { + "description": "Retrieves a list of all Worklogs associated to the given Account key that matches the search parameters", + "operationId": "getWorklogsByAccount", + "parameters": [ + { + "in": "path", + "name": "accountKey", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve results starting with this date", + "in": "query", + "name": "from", + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve results up to and including this date", + "in": "query", + "name": "to", + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve results that have been updated from this date", + "in": "query", + "name": "updatedFrom", + "schema": { + "type": "string" + } + }, + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableWorklog" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Account key cannot be found in the system" + } + }, + "summary": "Search Worklogs associated to Account", + "tags": [ + "Worklogs" + ] + } + }, + "/worklogs/issue/{issueId}": { + "get": { + "description": "Retrieves a list of all Worklogs associated to the given Issue id that matches the search parameters", + "operationId": "getWorklogsByIssueId", + "parameters": [ + { + "in": "path", + "name": "issueId", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "description": "Retrieve results starting with this date", + "in": "query", + "name": "from", + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve results up to and including this date", + "in": "query", + "name": "to", + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve results that have been updated from this date", + "in": "query", + "name": "updatedFrom", + "schema": { + "type": "string" + } + }, + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableWorklog" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Worklog cannot be found in the system" + } + }, + "summary": "Search Worklogs associated to Issue id", + "tags": [ + "Worklogs" + ] + } + }, + "/worklogs/jira-to-tempo": { + "post": { + "description": "Retrieves a list of existing Tempo Worklog ids that match the informed Jira Worklog ids. If a Tempo Worklog Id cannot be found, it will not be returned on the results", + "operationId": "getTempoWorklogIdsByJiraWorklogIds", + "parameters": [ + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JiraWorklogIdList" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableWorklogIdMapper" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Tempo Worklog ids by Jira Worklog ids", + "tags": [ + "Worklogs" + ] + } + }, + "/worklogs/project/{projectId}": { + "get": { + "description": "Retrieves a list of all Worklogs associated to the given projectId that matches the search parameters", + "operationId": "getWorklogsByProjectId", + "parameters": [ + { + "description": "Id of the project you want to retrieve Worklogs for", + "in": "path", + "name": "projectId", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "description": "Retrieve results starting with this date", + "in": "query", + "name": "from", + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve results up to and including this date", + "in": "query", + "name": "to", + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve results that have been updated from this date", + "in": "query", + "name": "updatedFrom", + "schema": { + "type": "string" + } + }, + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableWorklog" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Project cannot be found in the system" + } + }, + "summary": "Retrieve Worklogs associated to projectId", + "tags": [ + "Worklogs" + ] + } + }, + "/worklogs/search": { + "post": { + "description": "Retrieves a list of existing Worklogs that matches the given search parameters", + "operationId": "searchWorklogs", + "parameters": [ + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorklogSearchInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableWorklog" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Search Worklogs", + "tags": [ + "Worklogs" + ] + } + }, + "/worklogs/team/{teamId}": { + "get": { + "description": "Retrieve a list of all Worklogs associated to the given Team id that matches the search parameters", + "operationId": "getWorklogsByTeam", + "parameters": [ + { + "in": "path", + "name": "teamId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve results starting with this date", + "in": "query", + "name": "from", + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve results up to and including this date", + "in": "query", + "name": "to", + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve results that have been updated from this date", + "in": "query", + "name": "updatedFrom", + "schema": { + "type": "string" + } + }, + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableWorklog" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Team cannot be found in the system" + } + }, + "summary": "Search Worklogs associated to Team", + "tags": [ + "Worklogs" + ] + } + }, + "/worklogs/tempo-to-jira": { + "post": { + "description": "Retrieves a list of existing Jira Worklog ids that match the informed Tempo Worklog ids. If a Jira Worklog Id cannot be found, it will not be returned on the results", + "operationId": "getJiraWorklogIdsByTempoWorklogIds", + "parameters": [ + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TempoWorklogIdList" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableWorklogIdMapper" + } + } + }, + "description": "SUCCESS" + } + }, + "summary": "Retrieve Jira Worklog ids by Tempo Worklog ids", + "tags": [ + "Worklogs" + ] + } + }, + "/worklogs/user/{accountId}": { + "get": { + "description": "Retrieves a list of all Worklogs associated to the given User that matches the search parameters", + "operationId": "getWorklogsByUser", + "parameters": [ + { + "in": "path", + "name": "accountId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve results starting with this date", + "in": "query", + "name": "from", + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve results up to and including this date", + "in": "query", + "name": "to", + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve results that have been updated from this date", + "in": "query", + "name": "updatedFrom", + "schema": { + "type": "string" + } + }, + { + "description": "Skip over a number of elements by specifying an offset value for the query", + "in": "query", + "name": "offset", + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "description": "Limit the number of elements on the response", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int32", + "default": 50 + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageableWorklog" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "User cannot be found in the system" + } + }, + "summary": "Search Worklogs associated to User", + "tags": [ + "Worklogs" + ] + } + }, + "/worklogs/work-attribute-values": { + "post": { + "description": "Note: This API only supports creating new Work Attribute values. Work Attribute values can only be updated as part of the Worklog.", + "operationId": "createWorkAttributeValuesForWorklogs", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkAttributeValuesInput" + } + } + } + } + }, + "responses": { + "204": { + "description": "Work attribute values have been created" + }, + "400": { + "description": "Work attribute values cannot be created for some reasons, for example if the value is not valid for the type of the work attribute, or if the worklog already has a value for the specified attribute." + }, + "404": { + "description": "Worklog or Work attribute key not found" + } + }, + "summary": "Bulk create Work Attribute values for Worklogs", + "tags": [ + "Worklogs" + ] + } + }, + "/worklogs/work-attribute-values/search": { + "post": { + "description": "Retrieves a list of existing Work Attribute values that matches the given worklog ids", + "operationId": "searchWorkAttributeValuesForWorklogs", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkAttributeSearchInput" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkAttributeValuesByWorklog" + } + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Please provide at least 1 and at most 500 worklog ids" + } + }, + "summary": "Search Work Attribute values", + "tags": [ + "Worklogs" + ] + } + }, + "/worklogs/{id}": { + "delete": { + "description": "Deletes an existing Worklog for the given id", + "operationId": "deleteWorklog", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Worklog has been successfully deleted" + }, + "404": { + "description": "Worklog cannot be found in the system" + } + }, + "summary": "Delete Worklog ", + "tags": [ + "Worklogs" + ] + }, + "get": { + "description": "Retrieves an existing Worklog for the given id", + "operationId": "getWorklogById", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Worklog" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Worklog cannot be found in the system" + } + }, + "summary": "Retrieve Worklog", + "tags": [ + "Worklogs" + ] + }, + "put": { + "description": "Updates an existing Worklog for the given id using the provided input and returns the updated Worklog", + "operationId": "updateWorklog", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorklogUpdate" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Worklog" + } + } + }, + "description": "SUCCESS" + }, + "400": { + "description": "Worklog cannot be updated for some reasons" + }, + "404": { + "description": "Worklog cannot be found in the system" + } + }, + "summary": "Update Worklog", + "tags": [ + "Worklogs" + ] + } + }, + "/worklogs/{id}/work-attribute-values": { + "get": { + "description": "Retrieves a list of all Work Attribute values for the given Worklog", + "operationId": "getWorkAttributeValuesForWorklog", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkAttributeValueResults" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Worklog cannot be found in the system" + } + }, + "summary": "Retrieve Work Attribute values for Worklog", + "tags": [ + "Worklogs" + ] + } + }, + "/worklogs/{id}/work-attribute-values/{key}": { + "get": { + "description": "Retrieves a specific Work Attribute value using the provided key, for the given Worklog", + "operationId": "getWorkAttributeValueForWorklog", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkAttributeValue" + } + } + }, + "description": "SUCCESS" + }, + "404": { + "description": "Work attribute value cannot be found in the system" + } + }, + "summary": "Retrieve Work Attribute value for Worklog", + "tags": [ + "Worklogs" + ] + } + } + }, + "components": { + "schemas": { + "Account": { + "type": "object", + "properties": { + "category": { + "$ref": "#/components/schemas/Category" + }, + "contact": { + "$ref": "#/components/schemas/UserContact" + }, + "customer": { + "$ref": "#/components/schemas/Customer" + }, + "global": { + "type": "boolean", + "description": "Is the `Account` a global account or not", + "example": false + }, + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `Account`", + "example": 7 + }, + "key": { + "type": "string", + "description": "The key of the `Account`", + "example": "CLOUDBAY_DEVELOPMENT" + }, + "lead": { + "$ref": "#/components/schemas/AccountUser" + }, + "links": { + "$ref": "#/components/schemas/Self" + }, + "monthlyBudget": { + "type": "integer", + "format": "int32", + "description": "The estimated budget for the month", + "example": 600 + }, + "name": { + "type": "string", + "description": "The name of the `Account`", + "example": "Cloudbay: Development" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "status": { + "type": "string", + "description": "The status of the `Account`", + "enum": [ + "CLOSED", + "OPEN", + "ARCHIVED" + ], + "example": "OPEN" + } + }, + "required": [ + "global", + "id", + "key", + "lead", + "links", + "name", + "self", + "status" + ] + }, + "AccountInput": { + "type": "object", + "properties": { + "categoryKey": { + "type": "string", + "description": "A set of characters that uniquely identify a category", + "example": "Jdev1" + }, + "contactAccountId": { + "type": "string", + "description": "'accountId' of the contact, if the contact is a registered Jira user", + "example": "111aaaa2222bbbb3333cccc" + }, + "customerKey": { + "type": "string", + "description": "A set of characters that uniquely identify a customer", + "example": "cloudbay1" + }, + "externalContactName": { + "type": "string", + "description": "Name of the contact, if the contact is not a registered Jira user", + "example": "John Brown" + }, + "global": { + "type": "boolean", + "example": false + }, + "key": { + "type": "string", + "description": "A set of character that uniquely identify the account", + "example": "CLOUDBAY_DEVELOPMENT", + "pattern": "^[A-Za-z0-9_.-]*$" + }, + "leadAccountId": { + "type": "string", + "description": "'accountId' of the lead on the account", + "example": "123456:01234567-89ab-cdef-0123-456789abcdef" + }, + "monthlyBudget": { + "type": "integer", + "format": "int32", + "example": 600, + "minimum": 0 + }, + "name": { + "type": "string", + "description": "Name of the account", + "example": "Cloudbay: Development" + }, + "status": { + "type": "string", + "description": "The status of the account", + "enum": [ + "CLOSED", + "OPEN", + "ARCHIVED" + ], + "example": "OPEN" + } + }, + "required": [ + "key", + "leadAccountId", + "name", + "status" + ] + }, + "AccountLink": { + "type": "object", + "properties": { + "account": { + "$ref": "#/components/schemas/Self" + }, + "default": { + "type": "boolean", + "description": "If the `AccountLink` is the default for the scope", + "example": true + }, + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `AccountLink`", + "example": 1 + }, + "scope": { + "$ref": "#/components/schemas/AccountLinkScope" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "account", + "default", + "id", + "scope", + "self" + ] + }, + "AccountLinkInput": { + "type": "object", + "properties": { + "accountKey": { + "type": "string", + "description": "A set of character that uniquely identify an `Account`", + "example": "CLOUDBAY_DEVELOPMENT" + }, + "default": { + "type": "boolean", + "description": "An optional boolean to indicate if the account link is the default for the project", + "example": true + }, + "scopeId": { + "type": "integer", + "format": "int32", + "description": "The id of the scope", + "example": 100100, + "minimum": 1 + }, + "scopeType": { + "type": "string", + "description": "The type of scope the `Account` is linked to", + "enum": [ + "PROJECT" + ], + "example": "PROJECT" + } + }, + "required": [ + "accountKey", + "scopeId", + "scopeType" + ] + }, + "AccountLinkResults": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/ResultsMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountLink" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "AccountLinkScope": { + "type": "object", + "description": "Link to the scope of the `AccountLink`", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The id of the `AccountLinkScope`", + "example": 10012 + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "type": { + "type": "string", + "description": "The type of the `AccountLinkScope`", + "enum": [ + "PROJECT" + ], + "example": "PROJECT" + } + }, + "required": [ + "id", + "self", + "type" + ] + }, + "AccountSearchInput": { + "type": "object", + "properties": { + "global": { + "type": "boolean", + "description": "An optional boolean to indicate if the account should be global or not", + "example": true + }, + "ids": { + "type": "array", + "description": "A list of `Account` ids", + "example": [ + 1, + 2 + ], + "items": { + "type": "integer", + "format": "int64", + "description": "A list of `Account` ids" + } + }, + "keys": { + "type": "array", + "description": "A list of `Account` keys", + "example": [ + "CLOUDBAY_DEVELOPMENT" + ], + "items": { + "type": "string", + "description": "A list of `Account` keys", + "example": "[\"CLOUDBAY_DEVELOPMENT\"]" + } + }, + "statuses": { + "type": "array", + "description": "A list of `Account` statuses", + "enum": [ + "OPEN", + "CLOSED", + "ARCHIVED" + ], + "example": [ + "OPEN", + "ARCHIVED" + ], + "items": { + "type": "string", + "description": "A list of `Account` statuses", + "enum": [ + "OPEN", + "CLOSED", + "ARCHIVED" + ], + "example": "[\"OPEN\",\"ARCHIVED\"]" + } + } + } + }, + "AccountUser": { + "type": "object", + "description": "The lead of the `Account`", + "example": "The lead of the `Account`", + "properties": { + "accountId": { + "type": "string", + "description": "A unique identifier of the user in Jira", + "example": "123456:01234567-89ab-cdef-0123-456789abcdef" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "accountId" + ] + }, + "ActiveMemberships": { + "type": "object", + "properties": { + "active": { + "$ref": "#/components/schemas/Membership" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "self" + ] + }, + "Category": { + "type": "object", + "description": "The category of the `Account`", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `Category`", + "example": 14 + }, + "key": { + "type": "string", + "description": "The key of the `Category`", + "example": "300" + }, + "name": { + "type": "string", + "description": "The name of the `Category`", + "example": "Development" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "type": { + "$ref": "#/components/schemas/CategoryType" + } + }, + "required": [ + "id", + "key", + "name", + "self" + ] + }, + "CategoryInput": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "A set of characters that uniquely identify the category", + "example": "CLOUDBAY_DEVELOPMENT" + }, + "name": { + "type": "string", + "description": "The name of the category", + "example": "Cloudbay: Development" + }, + "typeName": { + "type": "string", + "description": "The type of the category", + "enum": [ + "BILLABLE", + "CAPITALIZED", + "INTERNAL", + "OPERATIONAL" + ], + "example": "BILLABLE" + } + }, + "required": [ + "key", + "name" + ] + }, + "CategoryResults": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/ResultsMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Category" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "CategoryType": { + "type": "object", + "description": "The type of the `Category`", + "properties": { + "name": { + "type": "string", + "description": "The name of the `CategoryType`", + "example": "BILLABLE" + } + }, + "required": [ + "name" + ] + }, + "CategoryTypeResults": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/ResultsMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CategoryType" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "CreateWorkAttributeInput": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "The key of the `WorkAttribute`", + "example": "_Attr_1_" + }, + "name": { + "type": "string", + "description": "The name of the `WorkAttribute`", + "example": "Attr 1" + }, + "required": { + "type": "boolean", + "description": "Whether this `WorkAttribute` is required. If not provided, the default value is `false`", + "example": false + }, + "type": { + "type": "string", + "description": "The type of the `WorkAttribute`", + "enum": [ + "ACCOUNT", + "CHECKBOX", + "INPUT_FIELD", + "INPUT_NUMERIC", + "STATIC_LIST" + ], + "example": "STATIC_LIST" + }, + "values": { + "type": "array", + "description": "Only relevant when type is `STATIC_LIST`. These values are immutable. Their UI representation can be looked up in the `names` object below", + "example": [ + "Some Value" + ], + "items": { + "type": "string", + "description": "Only relevant when type is `STATIC_LIST`. These values are immutable. Their UI representation can be looked up in the `names` object below", + "example": "[\"Some Value\"]" + } + } + }, + "required": [ + "key", + "name", + "type" + ] + }, + "Customer": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `Customer`", + "example": 234 + }, + "key": { + "type": "string", + "description": "The key of the `Customer`", + "example": "CLOUDBAY_DEVELOPMENT" + }, + "name": { + "type": "string", + "description": "The name of the `Customer`", + "example": "Cloudbay: Development" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "id", + "key", + "name", + "self" + ] + }, + "CustomerInput": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "The key of the `Customer`", + "example": "CLOUDBAY_DEVELOPMENT" + }, + "name": { + "type": "string", + "description": "The name of the `Customer`", + "example": "Cloudbay: Development" + } + }, + "required": [ + "key", + "name" + ] + }, + "DaySchedule": { + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date", + "description": "The date of the schedule" + }, + "holiday": { + "$ref": "#/components/schemas/Holiday" + }, + "requiredSeconds": { + "type": "integer", + "format": "int64", + "description": "The amount of seconds required in this schedule", + "example": 0 + }, + "type": { + "type": "string", + "description": "The type of schedule.", + "enum": [ + "WORKING_DAY", + "NON_WORKING_DAY", + "HOLIDAY", + "HOLIDAY_AND_NON_WORKING_DAY" + ] + } + }, + "required": [ + "date", + "requiredSeconds", + "type" + ] + }, + "DayScheduleResults": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/ResultsMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DaySchedule" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "Entity": { + "type": "object", + "description": "List of permission role access entity", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "self": { + "type": "string" + } + }, + "required": [ + "id", + "self" + ] + }, + "GenericResource": { + "type": "object", + "properties": { + "createdAt": { + "type": "string", + "description": "Timestamp (in UTC) of when this `Generic Resource` was created", + "example": "2022-02-22T15:09:00.000Z" + }, + "createdBy": { + "$ref": "#/components/schemas/UserRefBean" + }, + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `Generic Resource`", + "example": 7 + }, + "name": { + "type": "string", + "description": "The name of the `Generic Resource`", + "example": "Backend Developer" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "updatedAt": { + "type": "string", + "description": "Timestamp (in UTC) of when this `Generic Resource` was last updated", + "example": "2022-02-25T12:13:00.000Z" + }, + "updatedBy": { + "$ref": "#/components/schemas/UserRefBean" + } + }, + "required": [ + "createdAt", + "createdBy", + "id", + "name", + "self", + "updatedAt", + "updatedBy" + ] + }, + "GenericResourceInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the `Generic Resource`", + "example": "Backend Developer" + } + }, + "required": [ + "name" + ] + }, + "GenericResourceReference": { + "type": "object", + "description": "A list of references to the the `Generic Resources` that are members of this team", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `Generic Resource`", + "example": 7 + }, + "name": { + "type": "string", + "description": "The name of the `Generic Resource`", + "example": "Backend Developer" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "id", + "name", + "self" + ] + }, + "GenericResourceSearchInput": { + "type": "object", + "properties": { + "ids": { + "type": "array", + "description": "A list of `Generic Resource` ids", + "example": [ + 1, + 2 + ], + "items": { + "type": "integer", + "format": "int32", + "description": "A list of `Generic Resource` ids" + } + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "Maximum number of results on each page", + "example": 50 + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Number of skipped results", + "example": 0 + }, + "query": { + "type": "string", + "description": "A query to be used for string matching against name of `Generic Resources`", + "example": "java" + } + } + }, + "GenericResourceTeamMember": { + "type": "object", + "properties": { + "assignedToTeamAt": { + "type": "string", + "description": "Timestamp (in UTC) of when this `Generic Resource` was added to this team", + "example": "2022-02-22T15:09:00.000Z" + }, + "assignedToTeamBy": { + "$ref": "#/components/schemas/UserRefBean" + }, + "member": { + "$ref": "#/components/schemas/GenericResourceReference" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "team": { + "$ref": "#/components/schemas/TeamReference" + } + }, + "required": [ + "assignedToTeamAt", + "assignedToTeamBy", + "member", + "self", + "team" + ] + }, + "GenericResourceTeamMemberInput": { + "type": "object", + "properties": { + "genericResourceId": { + "type": "integer", + "format": "int32", + "description": "The id of the `Generic Resource` itself", + "example": 7 + } + }, + "required": [ + "genericResourceId" + ] + }, + "GenericResourceTeamMembers": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "format": "int32", + "description": "Count of `Generic Resource Team Members` in this team", + "example": 3 + }, + "members": { + "type": "array", + "description": "A list of references to the the `Generic Resources` that are members of this team", + "items": { + "$ref": "#/components/schemas/GenericResourceReference" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "team": { + "$ref": "#/components/schemas/TeamReference" + } + }, + "required": [ + "count", + "members", + "self", + "team" + ] + }, + "GlobalConfiguration": { + "type": "object", + "properties": { + "allowLoggingOnClosedAccount": { + "type": "boolean", + "description": "Boolean to inform if it is possible to login on closed account", + "example": true + }, + "approvalPeriod": { + "type": "string", + "description": "Shows if Timesheet approval periods are weekly or monthly.", + "enum": [ + "WEEK", + "MONTH" + ], + "example": "WEEK" + }, + "approvalWeekStart": { + "type": "integer", + "format": "int32", + "description": "Shows the start day. 1 is monday, 7 is sunday.", + "example": 1 + }, + "maxHoursPerDayPerUser": { + "type": "integer", + "format": "int32", + "description": "The max hours a user can work", + "example": 8 + }, + "numberOfDaysAllowedIntoFuture": { + "type": "integer", + "format": "int32", + "description": "Shows how many days you can track time into the future.", + "example": 90 + }, + "planApprovalEnabled": { + "type": "boolean", + "description": "Boolean to inform if planning approval is enabled", + "example": true + }, + "remainingEstimateOptional": { + "type": "boolean", + "description": "Shows if remaining estimate is required when tracking time.", + "example": true + }, + "startAndEndTimesEnabled": { + "type": "boolean", + "description": "Boolean to inform if start and end times should be used for logging time", + "example": false + }, + "startAndEndTimesForPlanningEnabled": { + "type": "boolean", + "description": "Boolean to inform if start and end times should be used for planning time", + "example": true + }, + "weekStart": { + "type": "integer", + "format": "int32", + "description": "1 is monday, 7 is sunday", + "example": 1 + }, + "worklogDescriptionOptional": { + "type": "boolean", + "description": "Shows if description is required when tracking time.", + "example": true + } + }, + "required": [ + "allowLoggingOnClosedAccount", + "approvalPeriod", + "approvalWeekStart", + "numberOfDaysAllowedIntoFuture", + "planApprovalEnabled", + "remainingEstimateOptional", + "startAndEndTimesEnabled", + "startAndEndTimesForPlanningEnabled", + "weekStart", + "worklogDescriptionOptional" + ] + }, + "Holiday": { + "type": "object", + "description": "The holiday linked to this schedule", + "properties": { + "date": { + "type": "string", + "format": "date", + "description": "The date of the `Holiday`" + }, + "description": { + "type": "string", + "description": "The description of the `Holiday`", + "example": "Holiday to celebrate all good things" + }, + "durationSeconds": { + "type": "integer", + "format": "int64", + "description": "The duration in seconds of the `Holiday`", + "example": 18000 + }, + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `Holiday`", + "example": 1 + }, + "name": { + "type": "string", + "description": "The name of the `Holiday`", + "example": "National Holiday" + }, + "schemeId": { + "type": "integer", + "format": "int32", + "description": "The id of the `Holiday Scheme`", + "example": 2 + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "type": { + "type": "string", + "description": "The type of the `Holiday`", + "enum": [ + "FIXED", + "FLOATING" + ], + "example": "FIXED" + } + }, + "required": [ + "date", + "durationSeconds", + "id", + "name", + "schemeId", + "self", + "type" + ] + }, + "HolidayInput": { + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date", + "description": "The date of the `Holiday`" + }, + "description": { + "type": "string", + "description": "The description of the `Holiday`", + "example": "Holiday to celebrate all good things" + }, + "durationSeconds": { + "type": "integer", + "format": "int64", + "description": "The duration in seconds of the `Holiday`", + "example": 18000, + "minimum": 1 + }, + "name": { + "type": "string", + "description": "The name of the `Holiday`", + "example": "National Holiday" + }, + "type": { + "type": "string", + "description": "The type of the `Holiday`", + "enum": [ + "FIXED", + "FLOATING" + ], + "example": "FIXED" + } + }, + "required": [ + "date", + "durationSeconds", + "name", + "type" + ] + }, + "HolidayResults": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/ResultsMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Holiday" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "HolidayScheme": { + "type": "object", + "properties": { + "defaultScheme": { + "type": "boolean", + "description": "Boolean to define if this is the default scheme", + "example": true + }, + "description": { + "type": "string", + "description": "The description of the `Holiday Scheme`", + "example": "Default holiday scheme for all employees" + }, + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `Holiday Scheme`", + "example": 1 + }, + "memberCount": { + "type": "integer", + "format": "int32", + "description": "The amount of people working under this `Holiday Scheme`", + "example": 67 + }, + "name": { + "type": "string", + "description": "The name of the `Holiday Scheme`", + "example": "Default Holiday Scheme" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "defaultScheme", + "id", + "memberCount", + "name", + "self" + ] + }, + "HolidaySchemeInputBean": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "The description of the `Holiday Scheme`", + "example": "Default holiday scheme for all employees" + }, + "name": { + "type": "string", + "description": "The name of the `Holiday Scheme`", + "example": "Default Holiday Scheme" + } + }, + "required": [ + "name" + ] + }, + "HolidaySchemeMembersInput": { + "type": "object", + "properties": { + "accountIds": { + "type": "array", + "description": "A list of account ids", + "example": "123456:01234567-89ab-cdef-0123-456789abcdef", + "items": { + "type": "string", + "description": "A list of account ids", + "example": "123456:01234567-89ab-cdef-0123-456789abcdef", + "maxLength": 2147483647, + "minLength": 1 + }, + "maxItems": 2147483647, + "minItems": 1 + } + } + }, + "HolidaySchemeResults": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/ResultsMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HolidayScheme" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "Issue": { + "type": "object", + "description": "The Issue associated to this worklog", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The id of the issue", + "example": 124 + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "self" + ] + }, + "JiraWorklogIdList": { + "type": "object", + "properties": { + "jiraWorklogIds": { + "type": "array", + "description": "A list of Jira Worklog ids you want to retrieve the respective Tempo Worklog ids", + "example": [ + 1, + 2, + 3, + 4, + 5 + ], + "items": { + "type": "integer", + "format": "int64", + "description": "A list of Jira Worklog ids you want to retrieve the respective Tempo Worklog ids", + "maximum": 2147483647, + "minimum": 1 + }, + "maxItems": 2147483647, + "minItems": 1 + } + }, + "required": [ + "jiraWorklogIds" + ] + }, + "MemberMemberships": { + "type": "object", + "properties": { + "member": { + "$ref": "#/components/schemas/User" + }, + "memberships": { + "$ref": "#/components/schemas/ActiveMemberships" + }, + "team": { + "$ref": "#/components/schemas/Self" + } + }, + "required": [ + "member", + "memberships", + "team" + ] + }, + "Membership": { + "type": "object", + "properties": { + "commitmentPercent": { + "type": "integer", + "format": "int32" + }, + "from": { + "type": "string" + }, + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `Membership`", + "example": 123 + }, + "member": { + "$ref": "#/components/schemas/Self" + }, + "role": { + "$ref": "#/components/schemas/RoleReference" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "team": { + "$ref": "#/components/schemas/Self" + }, + "to": { + "type": "string" + } + }, + "required": [ + "commitmentPercent", + "id", + "role", + "self" + ] + }, + "MembershipInput": { + "type": "object", + "properties": { + "commitmentPercent": { + "type": "integer", + "format": "int32", + "maximum": 100, + "minimum": 0 + }, + "from": { + "type": "string", + "format": "date", + "description": "The start date of the `Membership`" + }, + "roleId": { + "type": "integer", + "format": "int32", + "description": "The Role Id of the `Membership`", + "example": 2 + }, + "to": { + "type": "string", + "format": "date", + "description": "The end date of the `Membership`" + } + } + }, + "Pageable": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Worklog" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "PageableAccount": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Account" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "PageableAccountLink": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountLink" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "PageableBeanWithoutLinks": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadataBeanWithoutLinks" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Plan" + } + } + } + }, + "PageableCustomer": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Customer" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "PageableGenericResourceWithoutSelfLink": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GenericResource" + } + } + } + }, + "PageableMemberMemberships": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MemberMemberships" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "PageableMetadata": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "format": "int32", + "description": "The number of results returned on this page", + "example": 1 + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "Maximum number of results on each page", + "example": 50 + }, + "next": { + "type": "string", + "description": "A link to the next page of results, if applicable", + "example": "https://api.tempo.io/[...]" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Number of skipped results" + }, + "previous": { + "type": "string", + "description": "A link to the previous page of results, if applicable", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "count", + "limit", + "offset" + ] + }, + "PageableMetadataBeanWithoutLinks": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "format": "int32", + "description": "The number of results returned on this page", + "example": 1 + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "Maximum number of results on each page", + "example": 50 + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Number of skipped results" + } + }, + "required": [ + "count", + "limit", + "offset" + ] + }, + "PageablePermissionRole": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PermissionRole" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "PageablePlan": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Plan" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "PageablePlanBeanWithoutLinks": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadataBeanWithoutLinks" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Plan" + } + } + } + }, + "PageableSkill": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Skill" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "PageableTeam": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Team" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "PageableTeamLink": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamLink" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "PageableUser": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "PageableWithoutSelfLink": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GenericResource" + } + } + } + }, + "PageableWorkAttribute": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkAttribute" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "PageableWorkloadScheme": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkloadScheme" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "PageableWorklog": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Worklog" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "PageableWorklogIdMapper": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/PageableMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorklogIdMapper" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "Permission": { + "type": "object", + "description": "List of the roles permissions", + "properties": { + "key": { + "type": "string", + "description": "The key of the `Permission`", + "example": "permissions.worklog.view" + } + }, + "required": [ + "key" + ] + }, + "PermissionRole": { + "type": "object", + "properties": { + "accessEntities": { + "type": "array", + "description": "List of permission role access entity", + "items": { + "$ref": "#/components/schemas/Entity" + } + }, + "accessType": { + "type": "string", + "description": "The type of the permission role which can be `TEAM` or `Global`. `GLOBAL` permission roles don't have entities.", + "enum": [ + "TEAM", + "GLOBAL" + ], + "example": "TEAM" + }, + "editable": { + "type": "boolean", + "description": "Editable roles are manually created with updatable members.", + "example": false + }, + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the permission role", + "example": 6 + }, + "name": { + "type": "string", + "description": "The name of the permission role", + "example": "The Role" + }, + "permissions": { + "type": "array", + "description": "List of the roles permissions", + "items": { + "$ref": "#/components/schemas/Permission" + } + }, + "permittedUsers": { + "type": "array", + "description": "List of users", + "items": { + "$ref": "#/components/schemas/User" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "accessEntities", + "accessType", + "editable", + "id", + "name", + "permissions", + "permittedUsers", + "self" + ] + }, + "PermissionRoleInput": { + "type": "object", + "properties": { + "accessEntityIds": { + "type": "array", + "description": "A list of access entity ids", + "example": [ + 1 + ], + "items": { + "type": "integer", + "format": "int32", + "description": "A list of access entity ids" + } + }, + "accessType": { + "type": "string", + "description": "The type of the `PermissionRole` which can be `TEAM` or `GLOBAL`. `GLOBAL` permission roles don't have entities.", + "enum": [ + "TEAM", + "GLOBAL" + ], + "example": "TEAM" + }, + "name": { + "type": "string", + "description": "Name of the permission role", + "example": "The Role" + }, + "permissionKeys": { + "type": "array", + "description": "A list of permission keys", + "example": [ + "permissions.worklog.view" + ], + "items": { + "type": "string", + "description": "A list of permission keys", + "example": "[\"permissions.worklog.view\"]" + } + }, + "permittedAccountIds": { + "type": "array", + "description": "A list of permitted account ids", + "example": "jira-account-id", + "items": { + "type": "string", + "description": "A list of permitted account ids", + "example": "jira-account-id" + } + } + }, + "required": [ + "accessType", + "name" + ] + }, + "Plan": { + "type": "object", + "properties": { + "assignee": { + "$ref": "#/components/schemas/PlanAssignee" + }, + "createdAt": { + "type": "string", + "description": "Date and time the `Plan` was created`.", + "example": "2022-04-06T16:11:18.000Z" + }, + "description": { + "type": "string", + "description": "A description containing details of the `Plan`.", + "example": "I will do some tests on this task tomorrow" + }, + "endDate": { + "type": "string", + "description": "The ending date of the `Plan`.", + "example": "2022-05-17T00:00:00.000Z" + }, + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `Plan`.", + "example": 1 + }, + "includeNonWorkingDays": { + "type": "boolean", + "description": "Boolean value that informs whether non-working days are included in the `Plan`.", + "example": true + }, + "planApproval": { + "$ref": "#/components/schemas/PlanApproval" + }, + "planItem": { + "$ref": "#/components/schemas/PlanItem" + }, + "plannedSecondsPerDay": { + "type": "integer", + "format": "int64", + "description": "The amount of seconds that will be invested daily in the `Plan`.", + "example": 28800 + }, + "plannedTime": { + "$ref": "#/components/schemas/PlannedTime" + }, + "recurrenceEndDate": { + "type": "string", + "description": "End date for recurrence of the `Plan`.", + "example": "2020-05-17T00:00:00.000Z" + }, + "rule": { + "type": "string", + "description": "Recurrence rule of the `Plan`.", + "example": "WEEKLY" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "startDate": { + "type": "string", + "description": "The starting date of the `Plan`.", + "example": "2022-05-17T00:00:00.000Z" + }, + "startTime": { + "type": "string", + "description": "The start time of the `Plan`", + "example": "08:15" + }, + "totalPlannedSecondsInScope": { + "type": "integer", + "format": "int64", + "description": "The amount of seconds planned for on the entire `Plan` within the scope of the supplied `from` and `to` dates.", + "example": 28800 + }, + "updatedAt": { + "type": "string", + "description": "Date and time the `Plan` was last updated.", + "example": "2022-06-03T15:19:09.000Z" + } + }, + "required": [ + "self" + ] + }, + "PlanApproval": { + "type": "object", + "description": "Reference to an approval linked to the `Plan`.", + "properties": { + "reviewer": { + "$ref": "#/components/schemas/User" + }, + "status": { + "type": "string", + "description": "The status of the `PlanApproval`.", + "enum": [ + "APPROVED", + "REJECTED", + "REQUESTED" + ], + "example": "APPROVED" + } + } + }, + "PlanApprovalInput": { + "type": "object", + "description": "Reference to an approval linked to the `Plan`.", + "properties": { + "reviewerId": { + "type": "string", + "description": "A unique identifier of the user in Jira who will review this `PlanApproval`.", + "example": "123456:01234567-89ab-cdef-0123-456789abcdef" + }, + "status": { + "type": "string", + "description": "The status of the `PlanApproval`.", + "enum": [ + "APPROVED", + "REJECTED", + "REQUESTED" + ], + "example": "APPROVED" + } + } + }, + "PlanAssignee": { + "type": "object", + "description": "Reference to Assignee of the `Plan`.", + "properties": { + "id": { + "type": "string", + "description": "The id of the `Assignee`.", + "example": "123456:01234567-89ab-cdef-0123-456789abcdef" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "type": { + "type": "string", + "description": "The type of the `Assignee`.", + "example": "USER" + } + }, + "required": [ + "self" + ] + }, + "PlanDay": { + "type": "object", + "description": "List of days/periods that are included in this plan within the scope of the given date range.", + "properties": { + "date": { + "type": "string", + "description": "A date to represent a planned day for the `Plan`.", + "example": "2022-05-17T00:00:00.000Z" + }, + "plannedSeconds": { + "type": "integer", + "format": "int64", + "description": "The amount of seconds that will be invested in the `Plan` for the planned date.", + "example": 28800 + } + }, + "required": [ + "date", + "plannedSeconds" + ] + }, + "PlanInput": { + "type": "object", + "properties": { + "assigneeId": { + "type": "string", + "description": "The id of the `Assignee` for the `Plan`.", + "example": "123456:01234567-89ab-cdef-0123-456789abcdef" + }, + "assigneeType": { + "type": "string", + "description": "The type of the `Assignee` for the `Plan`.", + "enum": [ + "USER", + "GENERIC" + ], + "example": "USER" + }, + "description": { + "type": "string", + "description": "A description containing details of the `Plan`.", + "example": "I will do some tests on this task tomorrow" + }, + "endDate": { + "type": "string", + "description": "The ending date of the `Plan`.", + "example": "2022-05-17T00:00:00.000Z" + }, + "includeNonWorkingDays": { + "type": "boolean", + "description": "Boolean value that informs whether non-working days are included in the `Plan`.", + "example": true + }, + "planApproval": { + "$ref": "#/components/schemas/PlanApprovalInput" + }, + "planItemId": { + "type": "string", + "description": "The id of the `Plan Item` for the `Plan`.", + "example": "598" + }, + "planItemType": { + "type": "string", + "description": "The type of the `Plan Item` for the `Plan`.", + "enum": [ + "ISSUE", + "PROJECT" + ], + "example": "ISSUE" + }, + "plannedSecondsPerDay": { + "type": "integer", + "format": "int64", + "description": "The amount of seconds that will be invested daily on the `Plan`.", + "example": 28800, + "minimum": 1 + }, + "recurrenceEndDate": { + "type": "string", + "description": "End date for the recurrence of the `Plan`.", + "example": "2020-05-17T00:00:00.000Z" + }, + "rule": { + "type": "string", + "description": "Recurrence rule of the `Plan`.", + "enum": [ + "NEVER", + "WEEKLY", + "BI_WEEKLY", + "MONTHLY" + ], + "example": "WEEKLY" + }, + "startDate": { + "type": "string", + "description": "The starting date of the `Plan`.", + "example": "2022-05-17T00:00:00.000Z" + }, + "startTime": { + "type": "string", + "description": "The start time of the `Plan`.", + "example": "08:15", + "pattern": "^([0-1]?[0-9]|2[0-3])(:[0-5][0-9])$" + } + }, + "required": [ + "assigneeId", + "assigneeType", + "endDate", + "planItemId", + "planItemType", + "plannedSecondsPerDay", + "startDate" + ] + }, + "PlanItem": { + "type": "object", + "description": "Reference to `Plan Item` of the `Plan`.", + "properties": { + "id": { + "type": "string", + "description": "The id of the Item", + "example": "598" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "type": { + "type": "string", + "description": "The type of the `Plan Item` for the `Plan`.", + "example": "ISSUE" + } + }, + "required": [ + "id", + "self", + "type" + ] + }, + "PlanMetadata": { + "type": "object", + "description": "A reference to the metadata of this object.", + "properties": { + "all": { + "type": "string", + "description": "A link to get this plan with all the days of the plan included.", + "example": "https://api.tempo.io/[...]" + } + } + }, + "PlanPeriod": { + "type": "object", + "description": "List of days/periods that are included in this plan within the scope of the given date range.", + "properties": { + "from": { + "type": "string", + "description": "The starting date of the `Period`.", + "example": "2022-05-17T00:00:00.000Z" + }, + "plannedSeconds": { + "type": "integer", + "format": "int64", + "description": "Total planned seconds for the `Period`.", + "example": 28800 + }, + "to": { + "type": "string", + "description": "The ending date of the `Period`.", + "example": "2022-05-17T00:00:00.000Z" + } + } + }, + "PlanResults": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/ResultsMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Plan" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "PlanSearchInput": { + "type": "object", + "properties": { + "accountIds": { + "type": "array", + "description": "Ids of the user assignees you want to search plans for.", + "example": [ + "123456:01234567-89ab-cdef-0123-456789abcdef", + "123456:01234567-89ab-cdef-0123-456789abcdef" + ], + "items": { + "type": "string", + "description": "Ids of the user assignees you want to search plans for.", + "example": "[\"123456:01234567-89ab-cdef-0123-456789abcdef\",\"123456:01234567-89ab-cdef-0123-456789abcdef\"]" + } + }, + "assigneeTypes": { + "type": "array", + "description": "Types of the assignees you want to search plans for.", + "enum": [ + "USER", + "GENERIC" + ], + "example": [ + "USER", + "GENERIC" + ], + "items": { + "type": "string", + "description": "Types of the assignees you want to search plans for.", + "enum": [ + "USER", + "GENERIC" + ], + "example": "[\"USER\",\"GENERIC\"]" + } + }, + "from": { + "type": "string", + "description": "Retrieve plans starting with this date.", + "example": "2022-05-17T00:00:00.000Z" + }, + "genericResourceIds": { + "type": "array", + "description": "Ids of the generic resources you want to search plans for.", + "example": [ + "1", + "2" + ], + "items": { + "type": "integer", + "format": "int32", + "description": "Ids of the generic resources you want to search plans for." + } + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "Maximum number of results on each page.", + "example": 50, + "maximum": 5000 + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Number of skipped results.", + "example": 0 + }, + "planIds": { + "type": "array", + "description": "Ids of the plans you want to search for.", + "example": [ + "1", + "2" + ], + "items": { + "type": "integer", + "format": "int32", + "description": "Ids of the plans you want to search for." + } + }, + "planItemIds": { + "type": "array", + "description": "Ids of the items you want to search plans for.", + "example": [ + "10000", + "10001" + ], + "items": { + "type": "integer", + "format": "int32", + "description": "Ids of the items you want to search plans for." + } + }, + "planItemTypes": { + "type": "array", + "description": "Types of the items you want to search plans for.", + "enum": [ + "ISSUE", + "PROJECT" + ], + "example": [ + "ISSUE", + "PROJECT" + ], + "items": { + "type": "string", + "description": "Types of the items you want to search plans for.", + "enum": [ + "ISSUE", + "PROJECT" + ], + "example": "[\"ISSUE\",\"PROJECT\"]" + } + }, + "plannedTimeBreakdown": { + "type": "array", + "description": "Defines how detailed you would like to see the breakdown of the planned time for each `Plan`.", + "enum": [ + "DAILY", + "PERIOD" + ], + "example": [ + "DAILY", + "PERIOD" + ], + "items": { + "type": "string", + "description": "Defines how detailed you would like to see the breakdown of the planned time for each `Plan`.", + "enum": [ + "DAILY", + "PERIOD" + ], + "example": "[\"DAILY\",\"PERIOD\"]" + } + }, + "to": { + "type": "string", + "description": "Retrieve plans that ends up to and including this date.", + "example": "2022-05-17T00:00:00.000Z" + }, + "updatedFrom": { + "type": "string", + "description": "Retrieve plans that have been updated from this date.", + "example": "2022-05-17T00:00:00.000Z" + } + }, + "required": [ + "from", + "to" + ] + }, + "PlannedTime": { + "type": "object", + "description": "Includes the total planned time in scope and how it is broken down by days (and by periods if the `Plan` is a recurring plan).The daily and period breakdown of the plan is omitted by default when fetching multiple plans but can be included by specifying what breakdowns are desired.", + "properties": { + "days": { + "$ref": "#/components/schemas/PlannedTimeValuesPlanDay" + }, + "metadata": { + "$ref": "#/components/schemas/PlanMetadata" + }, + "periods": { + "$ref": "#/components/schemas/PlannedTimeValuesPlanPeriod" + } + } + }, + "PlannedTimeValuesPlanDay": { + "type": "object", + "description": "Planned time of the `Plan` broken down by days.", + "properties": { + "count": { + "type": "integer", + "format": "int32", + "description": "The number of results returned.", + "example": 1 + }, + "values": { + "type": "array", + "description": "List of days/periods that are included in this plan within the scope of the given date range.", + "items": { + "$ref": "#/components/schemas/PlanDay" + } + } + } + }, + "PlannedTimeValuesPlanPeriod": { + "type": "object", + "description": "Planned time of the `Plan` broken down by periods.", + "properties": { + "count": { + "type": "integer", + "format": "int32", + "description": "The number of results returned.", + "example": 1 + }, + "values": { + "type": "array", + "description": "List of days/periods that are included in this plan within the scope of the given date range.", + "items": { + "$ref": "#/components/schemas/PlanPeriod" + } + } + } + }, + "Program": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `Program`", + "example": 100201 + }, + "manager": { + "$ref": "#/components/schemas/User" + }, + "name": { + "type": "string", + "description": "The name of the `Program`", + "example": "Program: new Season" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "teams": { + "$ref": "#/components/schemas/SelfListTeamRef" + } + }, + "required": [ + "id", + "name", + "self", + "teams" + ] + }, + "ProgramInput": { + "type": "object", + "properties": { + "managerAccountId": { + "type": "string", + "description": "The key of the Manager Account", + "example": "123456:01234567-89ab-cdef-0123-456789abcdef" + }, + "name": { + "type": "string", + "description": "Name of the Program", + "example": "Program: new Season" + }, + "teamIds": { + "type": "array", + "description": "The list of keys of Teams associated to the `Program`", + "example": [ + 1, + 4, + 6, + 8 + ], + "items": { + "type": "integer", + "format": "int32", + "description": "The list of keys of Teams associated to the `Program`" + } + } + }, + "required": [ + "name" + ] + }, + "ProgramReference": { + "type": "object", + "description": "Link to the program of this Team", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `Program`", + "example": 100201 + }, + "name": { + "type": "string", + "description": "The name of the `Program`", + "example": "Program new Customer" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "id", + "name", + "self" + ] + }, + "ProgramResults": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/ResultsMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Program" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "ResultsMetadata": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "format": "int32", + "description": "The number of results returned", + "example": 1 + } + }, + "required": [ + "count" + ] + }, + "Role": { + "type": "object", + "properties": { + "default": { + "type": "boolean", + "description": "Boolean value that informs if this is a default `Role`", + "example": true + }, + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `Role`", + "example": 126 + }, + "name": { + "type": "string", + "description": "The name of the `Role`", + "example": "Developer" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "default", + "id", + "name", + "self" + ] + }, + "RoleInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the `Role`", + "example": "Developer" + } + }, + "required": [ + "name" + ] + }, + "RoleReference": { + "type": "object", + "description": "The Role of the `Membership`", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `Role`", + "example": 2 + }, + "name": { + "type": "string", + "description": "The name of the `Role`", + "example": "Developer" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "id", + "name", + "self" + ] + }, + "RoleResults": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/ResultsMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "Self": { + "type": "object", + "properties": { + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "self" + ] + }, + "SelfApiBean": { + "type": "object", + "description": "A permanent link to this resource", + "properties": { + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "self" + ] + }, + "SelfLink": { + "type": "object", + "description": "The collection of links pointing to this Team", + "properties": { + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "self" + ] + }, + "SelfListTeamRef": { + "type": "object", + "description": "A link to another Program", + "properties": { + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "values": { + "type": "array", + "description": "A group of links referencing this resource", + "items": { + "$ref": "#/components/schemas/TeamRef" + } + } + }, + "required": [ + "self" + ] + }, + "SelfListWorkAttributeValue": { + "type": "object", + "description": "The list of work attribute of this `Worklog`", + "properties": { + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "values": { + "type": "array", + "description": "A group of links referencing this resource", + "items": { + "$ref": "#/components/schemas/WorkAttributeValue" + } + } + }, + "required": [ + "self" + ] + }, + "SelfMember": { + "type": "object", + "description": "The collection of members pointing to this Team", + "properties": { + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "self" + ] + }, + "Skill": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `Skill`", + "example": 9 + }, + "name": { + "type": "string", + "description": "The name of the `Skill`", + "example": "Java" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "id", + "name", + "self" + ] + }, + "SkillInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the `Skill`", + "example": "Java" + } + }, + "required": [ + "name" + ] + }, + "SkillsAssignmentInput": { + "type": "object", + "properties": { + "assigneeId": { + "type": "string", + "description": "A set of characters that uniquely identify a resource", + "example": "123456:01234567-89ab-cdef-0123-456789abcdef | 5" + }, + "assigneeType": { + "type": "string", + "description": "A string that identify the resource type", + "enum": [ + "USER", + "GENERIC" + ], + "example": "USER" + }, + "skillIds": { + "type": "array", + "description": "A list of `Skill` ids", + "example": [ + 1, + 2, + 3, + 4, + 5 + ], + "items": { + "type": "integer", + "format": "int32", + "description": "A list of `Skill` ids" + } + } + }, + "required": [ + "assigneeId", + "assigneeType" + ] + }, + "Team": { + "type": "object", + "properties": { + "administrative": { + "type": "boolean", + "description": "Determine if this is an administrative team" + }, + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `Team`", + "example": 123 + }, + "lead": { + "$ref": "#/components/schemas/TeamLead" + }, + "links": { + "$ref": "#/components/schemas/SelfLink" + }, + "members": { + "$ref": "#/components/schemas/SelfMember" + }, + "name": { + "type": "string", + "description": "The Team's name", + "example": "Team Alpha" + }, + "permissions": { + "$ref": "#/components/schemas/Self" + }, + "program": { + "$ref": "#/components/schemas/ProgramReference" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "summary": { + "type": "string", + "description": "Brief description of the `Team`", + "example": "Team created to solve the challenges in the company" + } + }, + "required": [ + "administrative", + "id", + "links", + "members", + "name", + "permissions", + "self" + ] + }, + "TeamInput": { + "type": "object", + "properties": { + "administrative": { + "type": "boolean", + "default": false, + "description": "Determine if this is an administrative team" + }, + "leadAccountId": { + "type": "string", + "description": "The id of Lead Account related to the `Team`", + "pattern": "^[a-zA-Z0-9-:_.]*$" + }, + "name": { + "type": "string", + "description": "The `Team` name" + }, + "programId": { + "type": "integer", + "format": "int32", + "description": "The id of program related to the `Team`", + "example": 132, + "minimum": 1 + }, + "public": { + "type": "boolean", + "default": true, + "description": "Determine if this entity could be public" + }, + "summary": { + "type": "string", + "description": "The summary of the `Team`", + "example": "This team was created to help different areas of the company" + } + }, + "required": [ + "name" + ] + }, + "TeamLead": { + "type": "object", + "description": "Reference to the Leader of the `Team`", + "properties": { + "accountId": { + "type": "string", + "description": "A unique identifier of the user in Jira", + "example": "123456:01234567-89ab-cdef-0123-456789abcdef" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "accountId" + ] + }, + "TeamLink": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `Team Link`", + "example": 100201 + }, + "scope": { + "$ref": "#/components/schemas/TeamLinkScope" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "team": { + "$ref": "#/components/schemas/Team" + } + }, + "required": [ + "id", + "scope", + "self", + "team" + ] + }, + "TeamLinkInput": { + "type": "object", + "properties": { + "scopeId": { + "type": "integer", + "format": "int32", + "description": "The id of the scope", + "minimum": 1 + }, + "scopeType": { + "type": "string", + "description": "The type of scope of the `Team Link`", + "enum": [ + "PROJECT" + ] + }, + "teamId": { + "type": "integer", + "format": "int32", + "description": "The id of the `Team Link`", + "minimum": 1 + } + }, + "required": [ + "scopeId", + "scopeType", + "teamId" + ] + }, + "TeamLinkResults": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/ResultsMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamLink" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "TeamLinkScope": { + "type": "object", + "description": "The team scope", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The id of the `Team Link Scope`", + "example": 100201 + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "type": { + "type": "string", + "description": "The Team Link Type", + "enum": [ + "BOARD", + "PROJECT" + ] + } + }, + "required": [ + "id", + "self", + "type" + ] + }, + "TeamMember": { + "type": "object", + "description": "The user member of the `Membership`", + "properties": { + "accountId": { + "type": "string", + "description": "A unique identifier of the user in Jira", + "example": "123456:01234567-89ab-cdef-0123-456789abcdef" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "accountId" + ] + }, + "TeamMembership": { + "type": "object", + "properties": { + "commitmentPercent": { + "type": "integer", + "format": "int32", + "description": "The commitment of the `Membership`", + "example": 50 + }, + "from": { + "type": "string", + "format": "date", + "description": "The start date of the `Membership`" + }, + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `Membership`", + "example": 2 + }, + "member": { + "$ref": "#/components/schemas/TeamMember" + }, + "role": { + "$ref": "#/components/schemas/RoleReference" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "team": { + "$ref": "#/components/schemas/TeamRef" + }, + "to": { + "type": "string", + "format": "date", + "description": "The end date of the `Membership`" + } + }, + "required": [ + "self" + ] + }, + "TeamMembershipInput": { + "type": "object", + "properties": { + "accountId": { + "type": "string", + "description": "The account id of the `Member`", + "example": "1111aaaa2222bbbb3333cccc" + }, + "commitmentPercent": { + "type": "integer", + "format": "int32", + "description": "The percentage of the `Commitment`", + "example": 50, + "maximum": 100, + "minimum": 0 + }, + "from": { + "type": "string", + "format": "date", + "description": "The start date of the `Membership`" + }, + "roleId": { + "type": "integer", + "format": "int32", + "description": "The role id of the `Member`", + "example": 2 + }, + "teamId": { + "type": "integer", + "format": "int32", + "description": "The id of the `Team`", + "example": 1 + }, + "to": { + "type": "string", + "format": "date", + "description": "The end date of the `Membership`" + } + }, + "required": [ + "accountId", + "teamId" + ] + }, + "TeamMembershipResults": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/ResultsMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamMembership" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "TeamRef": { + "type": "object", + "description": "The Team of the `Membership`", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "Id of the Team", + "example": 12345 + }, + "name": { + "type": "string", + "description": "Name of the Team", + "example": "Team new adventure" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "id", + "name", + "self" + ] + }, + "TeamRefResults": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/ResultsMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamRef" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "TeamReference": { + "type": "object", + "description": "A reference to the team this `Generic Resource Team Member` belongs to", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "Id of the Team", + "example": 12345 + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "id", + "self" + ] + }, + "TempoWorklogIdList": { + "type": "object", + "properties": { + "tempoWorklogIds": { + "type": "array", + "description": "A list of Tempo Worklog ids you want to retrieve the respective Jira Worklog ids", + "example": [ + 1, + 2, + 3, + 4, + 5 + ], + "items": { + "type": "integer", + "format": "int64", + "description": "A list of Tempo Worklog ids you want to retrieve the respective Jira Worklog ids", + "maximum": 2147483647, + "minimum": 1 + }, + "maxItems": 2147483647, + "minItems": 1 + } + }, + "required": [ + "tempoWorklogIds" + ] + }, + "TimesheetApproval": { + "type": "object", + "properties": { + "actions": { + "$ref": "#/components/schemas/TimesheetApprovalAvailableActions" + }, + "period": { + "$ref": "#/components/schemas/TimesheetApprovalPeriod" + }, + "requiredSeconds": { + "type": "integer", + "format": "int64", + "description": "The mandatory seconds spent on this timesheet", + "example": 633600 + }, + "reviewer": { + "$ref": "#/components/schemas/TimesheetApprovalReviewer" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "status": { + "$ref": "#/components/schemas/TimesheetApprovalStatus" + }, + "timeSpentSeconds": { + "type": "integer", + "format": "int64", + "description": "The total seconds spent on this timesheet", + "example": 633600 + }, + "user": { + "$ref": "#/components/schemas/TimesheetApprovalUser" + }, + "worklogs": { + "$ref": "#/components/schemas/SelfApiBean" + } + }, + "required": [ + "actions", + "period", + "requiredSeconds", + "self", + "timeSpentSeconds", + "user", + "worklogs" + ] + }, + "TimesheetApprovalActor": { + "type": "object", + "description": "The person who is responsible for the current timesheet approval status", + "properties": { + "accountId": { + "type": "string", + "description": "A unique identifier of the user in Jira", + "example": "123456:01234567-89ab-cdef-0123-456789abcdef" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "accountId" + ] + }, + "TimesheetApprovalAvailableActions": { + "type": "object", + "description": "The Available actions to apply on this timesheet", + "properties": { + "approve": { + "$ref": "#/components/schemas/SelfApiBean" + }, + "reject": { + "$ref": "#/components/schemas/SelfApiBean" + }, + "reopen": { + "$ref": "#/components/schemas/SelfApiBean" + }, + "submit": { + "$ref": "#/components/schemas/SelfApiBean" + } + } + }, + "TimesheetApprovalInput": { + "type": "object", + "properties": { + "comment": { + "type": "string", + "description": "The comment about timesheet to approval", + "example": "This is a generic comment about this timesheet." + }, + "reviewerAccountId": { + "type": "string", + "description": "The Account id of the reviewer", + "example": "123456:01234567-89ab-cdef-0123-456789abcdef" + } + } + }, + "TimesheetApprovalPeriod": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date", + "description": "The period start date" + }, + "to": { + "type": "string", + "format": "date", + "description": "The period end date" + } + }, + "required": [ + "from", + "to" + ] + }, + "TimesheetApprovalPeriodsBean": { + "type": "object", + "properties": { + "periods": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimesheetApprovalPeriod" + } + } + } + }, + "TimesheetApprovalResults": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/ResultsMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimesheetApproval" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "TimesheetApprovalReviewer": { + "type": "object", + "description": "The reviewer of this timesheet", + "properties": { + "accountId": { + "type": "string", + "description": "A unique identifier of the user in Jira", + "example": "123456:01234567-89ab-cdef-0123-456789abcdef" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "accountId" + ] + }, + "TimesheetApprovalStatus": { + "type": "object", + "description": "The current status of this timesheet", + "properties": { + "actor": { + "$ref": "#/components/schemas/TimesheetApprovalActor" + }, + "comment": { + "type": "string", + "description": "The comment to request timesheet approval", + "example": "Hey, do it now!" + }, + "key": { + "type": "string", + "enum": [ + "OPEN", + "IN_REVIEW", + "APPROVED" + ] + }, + "requiredSecondsAtSubmit": { + "type": "integer", + "format": "int64", + "description": "The mandatory seconds spent on this timesheet", + "example": 633600 + }, + "timeSpentSecondsAtSubmit": { + "type": "integer", + "format": "int64", + "description": "The total seconds spent on this timesheet", + "example": 633600 + }, + "updatedAt": { + "type": "string", + "description": "The last date time when this timesheet was modified", + "example": "2022-01-01T00:00:00.000Z" + } + } + }, + "TimesheetApprovalUser": { + "type": "object", + "description": "The user owner of this timesheet", + "properties": { + "accountId": { + "type": "string", + "description": "A unique identifier of the user in Jira", + "example": "123456:01234567-89ab-cdef-0123-456789abcdef" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "accountId" + ] + }, + "UpdateWorkAttributeInput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the `WorkAttribute`", + "example": "Attr 1" + }, + "required": { + "type": "boolean", + "description": "Whether this `WorkAttribute` is required. If not provided, the default value is `false`", + "example": false + }, + "type": { + "type": "string", + "description": "The type of the `WorkAttribute`", + "enum": [ + "ACCOUNT", + "CHECKBOX", + "INPUT_FIELD", + "INPUT_NUMERIC", + "STATIC_LIST" + ], + "example": "STATIC_LIST" + }, + "values": { + "type": "array", + "description": "Only relevant when type is `STATIC_LIST`. These values are immutable. Their UI representation can be looked up in the `names` object below", + "example": [ + "Some Value" + ], + "items": { + "type": "string", + "description": "Only relevant when type is `STATIC_LIST`. These values are immutable. Their UI representation can be looked up in the `names` object below", + "example": "[\"Some Value\"]" + } + } + }, + "required": [ + "name", + "type" + ] + }, + "User": { + "type": "object", + "description": "The author of this `worklog`", + "properties": { + "accountId": { + "type": "string", + "description": "A unique identifier of the user in Jira", + "example": "123456:01234567-89ab-cdef-0123-456789abcdef" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "accountId" + ] + }, + "UserContact": { + "type": "object", + "description": "The contact of the `Account`", + "properties": { + "accountId": { + "type": "string", + "description": "A unique identifier of the user in Jira", + "example": "1111aaaa2222bbbb3333cccc" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "type": { + "type": "string", + "enum": [ + "USER", + "EXTERNAL" + ] + } + }, + "required": [ + "accountId", + "self" + ] + }, + "UserRefBean": { + "type": "object", + "description": "The creator of the `Generic Resource`", + "properties": { + "accountId": { + "type": "string", + "description": "A unique identifier of the user in Jira", + "example": "123456:01234567-89ab-cdef-0123-456789abcdef" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + } + }, + "UserResults": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/ResultsMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "WorkAttribute": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "The key of the `WorkAttribute`", + "example": "_Attr_1_" + }, + "name": { + "type": "string", + "description": "The name of the `WorkAttribute`", + "example": "Attr 1" + }, + "names": { + "type": "object", + "additionalProperties": { + "type": "string", + "description": "Only relevant when type is `STATIC_LIST`. Each `STATIC_LIST` entry has an immutable `value` which is stored with the worklog, and a `name` that is shown in the UI. The `name` can be changed.", + "example": "{\"SomeValue\":\"Some Value\"}" + }, + "description": "Only relevant when type is `STATIC_LIST`. Each `STATIC_LIST` entry has an immutable `value` which is stored with the worklog, and a `name` that is shown in the UI. The `name` can be changed.", + "example": { + "SomeValue": "Some Value" + } + }, + "required": { + "type": "boolean", + "description": "Whether this `WorkAttribute` is required", + "example": false + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "type": { + "type": "string", + "description": "The type of the `WorkAttribute`", + "example": "STATIC_LIST" + }, + "values": { + "type": "array", + "description": "Only relevant when type is `STATIC_LIST`. These values are immutable. Their UI representation can be looked up in the `names` object below", + "example": [ + "Some Value" + ], + "items": { + "type": "string", + "description": "Only relevant when type is `STATIC_LIST`. These values are immutable. Their UI representation can be looked up in the `names` object below", + "example": "[\"Some Value\"]" + } + } + }, + "required": [ + "key", + "name", + "required", + "self", + "type" + ] + }, + "WorkAttributeSearchInput": { + "type": "object", + "properties": { + "tempoWorklogIds": { + "type": "array", + "description": "Ids of the worklogs you want to search work attribute values for", + "example": [ + 1000, + 1001, + 1002 + ], + "items": { + "type": "integer", + "format": "int64", + "description": "Ids of the worklogs you want to search work attribute values for", + "maximum": 500, + "minimum": 1 + }, + "maxItems": 500, + "minItems": 1 + } + } + }, + "WorkAttributeValue": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "The key of the `WorkAttributeValue`", + "example": "_COLOR_" + }, + "value": { + "type": "string", + "description": "The value of the `WorkAttributeValue`", + "example": "green" + } + }, + "required": [ + "key" + ] + }, + "WorkAttributeValueInput": { + "type": "object", + "description": "The list of work attribute of this `Worklog`", + "properties": { + "key": { + "type": "string", + "description": "The key of the `WorkAttributeValue`", + "example": "_COLOR_" + }, + "value": { + "type": "string", + "description": "The value of the `WorkAttributeValue`", + "example": "green" + } + }, + "required": [ + "key" + ] + }, + "WorkAttributeValueResults": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/ResultsMetadata" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WorkAttributeValue" + } + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "metadata", + "results", + "self" + ] + }, + "WorkAttributeValuesByWorklog": { + "type": "object", + "properties": { + "tempoWorklogId": { + "type": "integer", + "format": "int64", + "description": "Id of the Worklog", + "example": 1 + }, + "workAttributeValues": { + "type": "array", + "description": "List of the Work Attribute Values", + "items": { + "$ref": "#/components/schemas/WorkAttributeValue" + } + } + } + }, + "WorkAttributeValuesInput": { + "type": "object", + "properties": { + "attributeValues": { + "type": "array", + "description": "The list of work attribute", + "items": { + "$ref": "#/components/schemas/WorkAttributeValueInput" + }, + "maxItems": 2147483647, + "minItems": 1, + "uniqueItems": true + }, + "tempoWorklogId": { + "type": "integer", + "format": "int64", + "description": "The worklog id in tempo app`", + "example": 128 + } + }, + "required": [ + "attributeValues", + "tempoWorklogId" + ] + }, + "WorkloadScheme": { + "type": "object", + "properties": { + "days": { + "type": "array", + "description": "The list of days and their required hours in this `WorkloadScheme`", + "items": { + "$ref": "#/components/schemas/WorkloadSchemeDay" + } + }, + "defaultScheme": { + "type": "boolean", + "description": "If this is the default `WorkloadScheme`", + "example": false + }, + "description": { + "type": "string", + "description": "The description `WorkloadScheme`", + "example": "Employees working 50%" + }, + "id": { + "type": "integer", + "format": "int32", + "description": "The id of the `WorkloadScheme`", + "example": 1 + }, + "memberCount": { + "type": "integer", + "format": "int64", + "description": "The number of members in this `WorkloadScheme`", + "example": 100 + }, + "name": { + "type": "string", + "description": "The name of the `WorkloadScheme`", + "example": "Part-time Workload Scheme" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + } + }, + "required": [ + "days", + "defaultScheme", + "description", + "id", + "memberCount", + "name", + "self" + ] + }, + "WorkloadSchemeDay": { + "type": "object", + "description": "The list of days and their required hours in this `WorkloadScheme`", + "properties": { + "day": { + "type": "string", + "description": "The day of the week", + "enum": [ + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "example": "WEDNESDAY" + }, + "requiredSeconds": { + "type": "integer", + "format": "int64", + "description": "The number of seconds required to be worked", + "example": 14400 + } + }, + "required": [ + "day", + "requiredSeconds" + ] + }, + "WorkloadSchemeDayInput": { + "type": "object", + "description": "The list of days and their required hours in the workload scheme. This list must be unique and contains all weekdays [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]", + "properties": { + "day": { + "type": "string", + "description": "The day of the week", + "enum": [ + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "example": "WEDNESDAY" + }, + "requiredSeconds": { + "type": "integer", + "format": "int64", + "description": "The number of seconds required to be worked", + "example": 14400 + } + }, + "required": [ + "day", + "requiredSeconds" + ] + }, + "WorkloadSchemeInput": { + "type": "object", + "properties": { + "days": { + "type": "array", + "description": "The list of days and their required hours in the workload scheme. This list must be unique and contains all weekdays [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]", + "items": { + "$ref": "#/components/schemas/WorkloadSchemeDayInput" + }, + "maxItems": 7, + "minItems": 7 + }, + "description": { + "type": "string", + "description": "The description of the workload scheme", + "example": "Employees working 50%" + }, + "name": { + "type": "string", + "description": "The name of the workload scheme", + "example": "Part-time Workload Scheme" + } + }, + "required": [ + "name" + ] + }, + "WorkloadSchemeMembersInput": { + "type": "object", + "properties": { + "accountIds": { + "type": "array", + "description": "The list of account ids in the workload scheme", + "example": [ + "111aaaa2222bbbb3333cccc", + "555dddd2222bbbb5656cccc" + ], + "items": { + "type": "string", + "description": "The list of account ids in the workload scheme", + "example": "[\"111aaaa2222bbbb3333cccc\",\"555dddd2222bbbb5656cccc\"]", + "maxLength": 2147483647, + "minLength": 1 + }, + "maxItems": 2147483647, + "minItems": 1 + } + }, + "required": [ + "accountIds" + ] + }, + "Worklog": { + "type": "object", + "properties": { + "attributes": { + "$ref": "#/components/schemas/SelfListWorkAttributeValue" + }, + "author": { + "$ref": "#/components/schemas/User" + }, + "billableSeconds": { + "type": "integer", + "format": "int64", + "description": "The amount of seconds billable", + "example": 100201 + }, + "createdAt": { + "type": "string", + "description": "The date and time when this `Worklog` was created", + "example": "2017-02-06T16:41:41.000Z" + }, + "description": { + "type": "string", + "description": "The description of the `Worklog`", + "example": "Investigating a problem with our external database system" + }, + "issue": { + "$ref": "#/components/schemas/Issue" + }, + "self": { + "type": "string", + "description": "A permanent link to this resource", + "example": "https://api.tempo.io/[...]" + }, + "startDate": { + "type": "string", + "format": "date", + "description": "The start date of the `Worklog`" + }, + "startTime": { + "type": "string", + "description": "The start time of the `Worklog`", + "example": 72360 + }, + "tempoWorklogId": { + "type": "integer", + "format": "int64", + "description": "The worklog Id in the tempo app", + "example": 126 + }, + "timeSpentSeconds": { + "type": "integer", + "format": "int64", + "description": "The total amount of time spent in seconds`", + "example": 3600 + }, + "updatedAt": { + "type": "string", + "description": "The last date and time when this `Worklog` was updated", + "example": "2017-02-06T16:41:41.000Z" + } + }, + "required": [ + "attributes", + "author", + "createdAt", + "issue", + "self", + "startDate", + "tempoWorklogId", + "timeSpentSeconds", + "updatedAt" + ] + }, + "WorklogIdMapper": { + "type": "object", + "properties": { + "jiraWorklogId": { + "type": "integer", + "format": "int64", + "description": "A unique identifier of the Worklog in Jira", + "example": 12345 + }, + "tempoWorklogId": { + "type": "integer", + "format": "int64", + "description": "A unique identifier of the Worklog in Tempo", + "example": 12345 + } + }, + "required": [ + "jiraWorklogId", + "tempoWorklogId" + ] + }, + "WorklogInput": { + "type": "object", + "properties": { + "attributes": { + "type": "array", + "description": "The list of work attribute of this `Worklog`", + "items": { + "$ref": "#/components/schemas/WorkAttributeValueInput" + }, + "uniqueItems": true + }, + "authorAccountId": { + "type": "string", + "description": "The Account id of the user author", + "example": "1111aaaa2222bbbb3333cccc" + }, + "billableSeconds": { + "type": "integer", + "format": "int64", + "description": "The amount of seconds billable", + "example": 100201 + }, + "description": { + "type": "string", + "description": "The description of the `Worklog`", + "example": "Investigating a problem with our external database system" + }, + "issueId": { + "type": "integer", + "format": "int64", + "description": "The id of the issue associated to this worklog", + "example": 10001, + "minimum": 1 + }, + "remainingEstimateSeconds": { + "type": "integer", + "format": "int64", + "description": "The total amount of estimated remaining seconds`", + "example": 120 + }, + "startDate": { + "type": "string", + "format": "date", + "description": "The start date of the `Worklog`" + }, + "startTime": { + "type": "string", + "description": "The start time of the `Worklog`", + "example": 72360, + "pattern": "^([0-1]?[0-9]|2[0-3])(:[0-5][0-9])(:[0-5][0-9])$" + }, + "timeSpentSeconds": { + "type": "integer", + "format": "int64", + "description": "The total amount of time spent in seconds`", + "example": 3600, + "minimum": 1 + } + }, + "required": [ + "authorAccountId", + "issueId", + "startDate", + "timeSpentSeconds" + ] + }, + "WorklogSearchInput": { + "type": "object", + "properties": { + "authorIds": { + "type": "array", + "description": "Ids of the authors you want to search worklogs for.", + "example": [ + "123456:01234567-89ab-cdef-0123-456789abcdef", + "123456:01234567-89ab-cdef-0123-456789abcdef" + ], + "items": { + "type": "string", + "description": "Ids of the authors you want to search worklogs for.", + "example": "[\"123456:01234567-89ab-cdef-0123-456789abcdef\",\"123456:01234567-89ab-cdef-0123-456789abcdef\"]" + } + }, + "from": { + "type": "string", + "description": "Retrieve worklogs starting with this date.", + "example": "2022-05-17T00:00:00.000Z" + }, + "issueIds": { + "type": "array", + "description": "Ids of the issues you want to search worklogs for", + "example": [ + "10000", + "100001" + ], + "items": { + "type": "integer", + "format": "int64", + "description": "Ids of the issues you want to search worklogs for" + } + }, + "projectIds": { + "type": "array", + "description": "Ids of the projects you want to search worklogs for", + "example": [ + "1", + "2" + ], + "items": { + "type": "integer", + "format": "int64", + "description": "Ids of the projects you want to search worklogs for" + } + }, + "to": { + "type": "string", + "description": "Retrieve worklogs that ends up to and including this date.", + "example": "2022-05-17T00:00:00.000Z" + }, + "updatedFrom": { + "type": "string", + "description": "Retrieve worklogs that have been updated from this date", + "example": "2022-05-17T00:00:00.000Z" + } + } + }, + "WorklogUpdate": { + "type": "object", + "properties": { + "attributes": { + "type": "array", + "description": "The list of work attribute of this `Worklog`", + "items": { + "$ref": "#/components/schemas/WorkAttributeValueInput" + }, + "uniqueItems": true + }, + "authorAccountId": { + "type": "string", + "description": "The Account id of the user author", + "example": "1111aaaa2222bbbb3333cccc" + }, + "billableSeconds": { + "type": "integer", + "format": "int64", + "description": "The amount of seconds billable", + "example": 100201 + }, + "description": { + "type": "string", + "description": "The description of the `Worklog`", + "example": "Investigating a problem with our external database system" + }, + "remainingEstimateSeconds": { + "type": "integer", + "format": "int64", + "description": "The total amount of estimated remaining seconds`", + "example": 120 + }, + "startDate": { + "type": "string", + "format": "date", + "description": "The start date of the `Worklog`" + }, + "startTime": { + "type": "string", + "description": "The start time of the `Worklog`", + "example": 72360, + "pattern": "^([0-1]?[0-9]|2[0-3])(:[0-5][0-9])(:[0-5][0-9])$" + }, + "timeSpentSeconds": { + "type": "integer", + "format": "int64", + "description": "The total amount of time spent in seconds`", + "example": 3600, + "minimum": 1 + } + }, + "required": [ + "authorAccountId", + "startDate", + "timeSpentSeconds" + ] + } + } + } +} \ No newline at end of file diff --git a/src/jvmTest/kotlin/community/flock/kotlinx/openapi/bindings/v2/OpenAPITests.kt b/src/jvmTest/kotlin/community/flock/kotlinx/openapi/bindings/v2/OpenAPITests.kt index af7f63c..6bd51ca 100644 --- a/src/jvmTest/kotlin/community/flock/kotlinx/openapi/bindings/v2/OpenAPITests.kt +++ b/src/jvmTest/kotlin/community/flock/kotlinx/openapi/bindings/v2/OpenAPITests.kt @@ -3,6 +3,8 @@ package community.flock.kotlinx.openapi.bindings.v2 import community.flock.kotlinx.openapi.bindings.IO import community.flock.kotlinx.openapi.bindings.Version import io.kotest.assertions.json.shouldEqualJson +import io.kotest.assertions.throwables.shouldThrow +import io.kotest.matchers.shouldBe import kotlin.test.Test @@ -14,6 +16,16 @@ class OpenAPITests { @Test fun `uber`() = runTest("uber.json") + @Test + fun `swagger is not valid`(){ + val input = IO.readFile("petstore.json", Version.V3) + val exception = shouldThrow { + OpenAPI.decodeFromString(input) + } + exception.message shouldBe "No valid openapi v2 element 'swagger' is missing" + + } + private fun runTest(fileName:String) { val input = IO.readFile(fileName, Version.V2) val openapi = OpenAPI.decodeFromString(input) diff --git a/src/jvmTest/kotlin/community/flock/kotlinx/openapi/bindings/v3/OpenAPITests.kt b/src/jvmTest/kotlin/community/flock/kotlinx/openapi/bindings/v3/OpenAPITests.kt index 0b9b3a4..f42863b 100644 --- a/src/jvmTest/kotlin/community/flock/kotlinx/openapi/bindings/v3/OpenAPITests.kt +++ b/src/jvmTest/kotlin/community/flock/kotlinx/openapi/bindings/v3/OpenAPITests.kt @@ -3,6 +3,8 @@ package community.flock.kotlinx.openapi.bindings.v3 import community.flock.kotlinx.openapi.bindings.IO import community.flock.kotlinx.openapi.bindings.Version import io.kotest.assertions.json.shouldEqualJson +import io.kotest.assertions.throwables.shouldThrow +import io.kotest.matchers.shouldBe import kotlin.test.Test @@ -38,12 +40,27 @@ class OpenAPITests { @Test fun `workday`() = runTest("workday.json") + @Test + fun `tempo-core`() = runTest("tempo-core.json") + + @Test + fun `openapi is not valid`(){ + val input = IO.readFile("petstore.json", Version.V2) + val exception = shouldThrow { + OpenAPI.decodeFromString(input) + } + exception.message shouldBe "No valid openapi v3 element 'openapi' is missing" + + } + private fun runTest(fileName:String) { val input = IO.readFile(fileName, Version.V3) val openapi = OpenAPI.decodeFromString(input) val string = OpenAPI.encodeToString(openapi) input shouldEqualJson string } + + }