{"components":{"examples":{"saveCommencement":{"description":"save commencement","value":{"build":"1234","client_key":"demo_client_key","commenced_at":"2023-02-09T10:21:55.893Z","commits":"f5cd38bc4e5b393fa67fdecd86971d31b60ca5a0","context":"test deployment of new api","environment_name":"production","pipeline":"deployment_pipeline_1"}},"saveCommencementResponse":{"description":"Response.","value":{"commencement":{"branch_name":"PLAN-1234_build_deployments_api","build":"1234","client_key":"demo_client_key","commenced_at":"2023-02-09T10:21:55.893Z","commits":"f5cd38bc4e5b393fa67fdecd86971d31b60ca5a0","pipeline":"deployment_pipeline_1"},"status":"OK"}},"saveDeployment":{"description":"Send details of a deployment with build and commit data","value":{"application_or_service_name":"Service1","application_or_service_release_id":"v1.0.0","attributes":{"key1":["value1","value2"],"key2":["value3","value4"]},"branch_name":"PLAN-1234_build_deployments_api","build":"1234","calculate_commits_in_build":true,"client_key":"demo_client_key","commenced_at":"2023-02-09T10:21:45.893Z","commits":"f5cd38bc4e5b393fa67fdecd86971d31b60ca5a0","context":"test deployment of new api","deployed_at":"2023-02-09T10:21:55.893Z","environment_name":"production","includes_fix_for_cfr":true,"is_prod_environment":true,"pipeline":"deployment_pipeline_1","status":"success","use_deployment_to_mark_as_deployed":true}},"saveDeploymentManyCommits":{"description":"Send details of a deployment specifying which commits are in the deployment","value":{"application_or_service_name":"Service1","application_or_service_release_id":"v1.0.0","attributes":{"key1":"value1"},"branch_name":"PLAN-1234_build_deployments_api","build":"1234","calculate_commits_in_build":false,"client_key":"demo_client_key","commenced_at":"2023-02-09T10:21:45.893Z","commits":["f5cd38bc4e5b393fa67fdecd86971d31b60ca5a0","010b210c36013356644d0195d29f94dc8e4ea3e5"],"context":"test deployment of new api","deployed_at":"2023-02-09T10:21:55.893Z","environment_name":"production","includes_fix_for_cfr":true,"is_prod_environment":true,"pipeline":"deployment_pipeline_1","status":"success","use_deployment_to_mark_as_deployed":true}},"saveDeploymentResponse":{"description":"Response. Contains two statuses, one corresponding to the status of the deployment, and one for the status of the request","value":{"deployment":{"application_or_service_name":"Service1","application_or_service_release_id":"v1.0.0","attributes":{"key1":"value1"},"branch_name":"PLAN-1234_build_deployments_api","build":"1234","client_key":"demo_client_key","commenced_at":"2023-02-09T10:21:45.893Z","commits":["010b210c36013356644d0195d29f94dc8e4ea3e5","f5cd38bc4e5b393fa67fdecd86971d31b60ca5a0"],"context":"test deployment of new api","deployed_at":"2023-02-09T10:21:55.893Z","environment_name":"production","includes_fix_for_cfr":true,"is_prod_environment":true,"pipeline":"deployment_pipeline_1","status":"success","use_deployment_to_mark_as_deployed":true},"status":"OK"}},"saveDeploymentWithMapping":{"description":"Send details of a deployment to match up with a previously submitted mapping","value":{"branch_name":"PLAN-1234_build_deployments_api","build":"1234","client_key":"demo_client_key","context":"test deployment of new api","deployed_at":"2023-02-09T10:21:55.893Z","environment_name":"production","pipeline":"deployment_pipeline_1","status":"success"}},"saveMapping":{"description":"Send mapping details before the deployment is complete","value":{"build":"1234","client_key":"demo_client_key","commits":"f5cd38bc4e5b393fa67fdecd86971d31b60ca5a0","environment_name":"production","pipeline":"deployment_pipeline_1"}},"saveMappingResponse":{"description":"Response. Includes the status of the request itself.","value":{"mapping":{"build":"1234","commits":"f5cd38bc4e5b393fa67fdecd86971d31b60ca5a0","environment_name":"production","pipeline":"deployment_pipeline_1"},"status":"OK"}}},"responses":{"DEFAULT_ERROR":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Default error response"},"UNPROCESSABLE_ENTITY":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unprocessable Entity"}},"schemas":{"CommencementRequest":{"properties":{"branch_name":{"nullable":true,"type":"string"},"build":{"nullable":true,"type":"string"},"client_key":{"nullable":false,"type":"string"},"commenced_at":{"format":"date-time","type":"string"},"commits":{"nullable":true,"oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"environment_name":{"nullable":true,"type":"string"},"pipeline":{"nullable":false,"type":"string"}},"required":["client_key","pipeline"]},"CommencementResponse":{"properties":{"commencement":{"$ref":"#/components/schemas/CommencementResponseDetails"},"status":{"type":"string"}},"type":"object"},"CommencementResponseDetails":{"properties":{"branch_name":{"nullable":true,"type":"string"},"build":{"type":"string"},"client_key":{"type":"string"},"commenced_at":{"type":"string"},"commit":{"type":"string"},"pipeline":{"type":"string"}},"type":"object"},"DeploymentList":{"properties":{"count":{"type":"integer"},"deployments":{"description":"A list of deployments.","items":{"$ref":"#/components/schemas/SaveResponseDetails"},"type":"array"},"status":{"type":"string"}},"type":"object"},"Error":{"properties":{"detail":{"description":"Error detail","type":"string"},"status":{"description":"Error code","type":"integer"},"title":{"description":"Error","type":"string"},"type":{"description":"Error type","type":"string"}},"type":"object"},"MappingRequest":{"properties":{"build":{"type":"string"},"client_key":{"nullable":false,"type":"string"},"commits":{"nullable":true,"oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"environment_name":{"nullable":true,"type":"string"},"pipeline":{"nullable":false,"type":"string"}},"required":["client_key","pipeline","commits","build"]},"MappingResponse":{"properties":{"mapping":{"$ref":"#/components/schemas/MappingResponseDetails"},"status":{"type":"string"}},"type":"object"},"MappingResponseDetails":{"properties":{"build":{"type":"string"},"commit":{"type":"string"},"environment_name":{"type":"string"},"pipeline":{"type":"string"}},"type":"object"},"PaginationMetadata":{"properties":{"first_page":{"type":"integer"},"last_page":{"type":"integer"},"next_page":{"type":"integer"},"page":{"type":"integer"},"previous_page":{"type":"integer"},"total":{"type":"integer"},"total_pages":{"type":"integer"}},"type":"object"},"SaveRequest":{"properties":{"application_or_service_name":{"nullable":true,"type":"string"},"application_or_service_release_id":{"nullable":true,"type":"string"},"attributes":{"additionalProperties":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]},"type":"object"},"branch_name":{"nullable":true,"type":"string"},"build":{"nullable":true,"type":"string"},"calculate_commits_in_build":{"default":true,"description":"Defaults to true","type":"boolean"},"client_key":{"nullable":false,"type":"string"},"commenced_at":{"nullable":true,"type":"string"},"commits":{"nullable":false,"oneOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]},"context":{"type":"string"},"deployed_at":{"format":"date-time","type":"string"},"environment_name":{"nullable":true,"type":"string"},"includes_fix_for_cfr":{"nullable":true,"type":"boolean"},"is_prod_environment":{"nullable":true,"type":"boolean"},"pipeline":{"nullable":false,"type":"string"},"status":{"nullable":false,"type":"string"},"use_deployment_to_mark_as_deployed":{"nullable":true,"type":"boolean"}},"required":["client_key","pipeline","status","calculate_commits_in_build"],"type":"object"},"SaveResponse":{"properties":{"deployment":{"$ref":"#/components/schemas/SaveResponseDetails"},"status":{"type":"string"}},"type":"object"},"SaveResponseDetails":{"properties":{"application_or_service_name":{"nullable":true,"type":"string"},"application_or_service_release_id":{"nullable":true,"type":"string"},"attributes":{"additionalProperties":{"items":{"nullable":true,"type":"string"},"type":"array"},"nullable":true,"type":"object"},"branch_name":{"nullable":true,"type":"string"},"build":{"type":"string"},"client_key":{"type":"string"},"commenced_at":{"nullable":true,"type":"string"},"commits":{"nullable":true,"oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"context":{"nullable":true,"type":"string"},"deployed_at":{"format":"date-time","type":"string"},"environment_name":{"nullable":true,"type":"string"},"includes_fix_for_cfr":{"nullable":true,"type":"boolean"},"is_prod_environment":{"nullable":true,"type":"boolean"},"pipeline":{"type":"string"},"status":{"type":"string"},"use_deployment_to_mark_as_deployed":{"nullable":true,"type":"boolean"}},"type":"object"},"UpdateRequest":{"properties":{"application_or_service_name":{"nullable":true,"type":"string"},"application_or_service_release_id":{"nullable":true,"type":"string"},"attributes":{"additionalProperties":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}]},"type":"object"},"branch_name":{"nullable":true,"type":"string"},"build":{"nullable":true,"type":"string"},"client_key":{"nullable":false,"type":"string"},"commenced_at":{"nullable":true,"type":"string"},"commits":{"nullable":true,"oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"context":{"nullable":true,"type":"string"},"environment_name":{"nullable":true,"type":"string"},"includes_fix_for_cfr":{"nullable":true,"type":"boolean"},"is_prod_environment":{"nullable":true,"type":"boolean"},"pipeline":{"nullable":false,"type":"string"},"status":{"nullable":true,"type":"string"}},"required":["client_key","pipeline"],"type":"object"}}},"info":{"description":"Our pipeline management integration enables you to track and visualise\nbuild and deployment events within Plandek's metrics and dashboards. It\noperates by your build and deployment processes making a request to Plandek's\nAPI. We recommend that you do this at the end of your production deployment\npipeline. This needs data about the HEAD commit sha, repo, and deployment status.\n\nThe original GET endpoints for sending us your deployment data are still functioning, \nbut are deprecated. Please use the POST endpoints for setting up any new integrations.\n\n### Authentication\nYou will need an access token to successfully call the API. To\nobtain your unique token, follow the simple instructions in the data \nconnections settings in Plandek. Please include your generated token as an \n`Authorization: Bearer` header in all requests. See below for examples.\n\nFor more details on how to send and use your Deployment data in Plandek, please\n<a href=\"https://help.plandek.com/en/articles/5124401-plandek-deployments-api-integration\">read the documentation</a>\n","title":"Plandek Deployments API","version":"v1"},"openapi":"3.0.2","paths":{"/deployment":{"post":{"description":"Call this endpoint at the end of your deployment when you know the status of the release.\n\nBy default, Plandek will use the the information in your deployment to work out what commits\nwere included in the release. If you want to specify the commits instead, you can send an array\nof commit hashes and set the flag `calculate_commits_in_build` to `false`.\n\nThis endpoint will not work with the existing `/deployment_mapping` endpoint, if you do not know all \nthe details of your deployment at the end of the process.\n\n__JSON body__\n\n* `client_key`: Required param.\n\n* `pipeline`: Required param.\n\n* `status`: Required param. Should be one of: success, failure, rollback, aborted\n\n* `build`: Required. Should be the build identifier in your pipeline management tool.\n\n* `commits`: Required. Commit sha should be the HEAD commit, or a list of commits \nincluded in the release being deployed. \n\n* `branch_name`:  Optional param.\n\n* `deployed_at`: Optional Param. (ISO date string including timezone. Defaults\nto current time if omitted.)\n\n* `context`: Optional. String with any value, which can be used to categorise the deployments.\n\n* `calculate_commits_in_build`: Required. Boolean. \n\n  If true, Plandek will tag all commits from the last deployed commit up until the single head commit you provided in the commits field as included in this release. The only exception to this is if this is your first deployment, then Plandek will associate the deployment with only the commit provided.\n\n  If false, you must specify the commits in the commits field and Plandek will associate this deployment with all of the commits provided in the commits field.\n\n* `commenced_at`: Optional. ISO date string including timezome. Used to calculate the time duration of the deployment.\n\n* `attributes`: Optional. A dictionary of key-value pairs to be associated with the deployment. A value can be either a list or a singular string. The keys need to be in alphanumeric format.\n\n* `includes_fix_for_cfr`: Optional. Boolean. This allows you to mark if this deployment contains a fix for a previous failed deployment, for example if it is a hotfix. This is can be used as a indicator that there has been a failed deployment in the failure rate calculations in your metric settings.\n\n* `application_or_service_name`: Optional. String in alphanumeric format. The name of the application or service that is being deployed. If provided, you also need to provide application_or_service_release_id.\n\n* `application_or_service_release_id`: Optional. String. The release id of the application or service that is being deployed. If provided, you also need to provide application_or_service_name. Needs to be in an alphanumeric format, underscores and full stops are allowed.\n\n* `environment_name`: Optional. String. The name of the environment that the deployment is being made to. If not sent, the environment name will be set to 'not_provided'.\n\n* `is_prod_environment`: Optional. Boolean. Used to signify if the deployment is made to a production environment. It can only be provided if environment_name is provided. \n\n* `use_deployment_to_mark_as_deployed`: Optional. Boolean. If false then commits associated with this deployment will not be marked as deployed in Plandek. If not provided, it will default to true.\n","operationId":"src.external.deployments.post_operations.post_deployment","requestBody":{"content":{"application/json":{"examples":{"save a deployment":{"$ref":"#/components/examples/saveDeployment"},"save a deployment - specify commits":{"$ref":"#/components/examples/saveDeploymentManyCommits"}},"schema":{"$ref":"#/components/schemas/SaveRequest","x-body-name":"deployment_data"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"save a deployment response":{"$ref":"#/components/examples/saveDeploymentResponse"}},"schema":{"$ref":"#/components/schemas/SaveResponse"}}},"description":"Successful operation"}},"tags":["Deployments"]}},"/deployment_commencement":{"post":{"description":"If you want to time the duration of your deployment, you can call this endpoint at the start\nof the process, then call `/deployment` when it's finished. To tie the start and end together we match\nthe values for pipeline and either build/commit\n\n__JSON body__\n\n* `client_key`: Required param.\n\n* `pipeline`: Required param.\n\n* `environment_name`: Optional, if not provided the value defaults to 'not_provided'.\n\n* `build`: Optional, at least one of `build`, `commits` or `branch_name` must\nbe provided\n\n* `branch_name`:  Optional, at least one of `build`, `commits` or `branch_name`\nmust be provided\n\n* `commits`: Optional, at least one of `build`, `commits` or `branch_name` must\nbe provided\n\n* `commenced_at`: Required. ISO date string including timezome.\n","operationId":"src.external.deployments.post_operations.post_commencement","requestBody":{"content":{"application/json":{"examples":{"save the commencement of a deployment":{"$ref":"#/components/examples/saveCommencement"}},"schema":{"$ref":"#/components/schemas/CommencementRequest","x-body-name":"commencement_data"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"save a commencement response":{"$ref":"#/components/examples/saveCommencementResponse"}},"schema":{"$ref":"#/components/schemas/CommencementResponse"}}},"description":"OK"}},"tags":["Deployments"]}},"/deployment_mapping":{"post":{"description":"If you do not know all the details (commits, build and pipeline) at the end of your deployment, you\ncan set these parameters in advance and Plandek will map them to the release when you do call the\n`/deployment` endpoint.\n\n__JSON body__\n* `client_key`: Required param.\n* `pipeline`: Required param.\n* `build`: Required param. Should be the build identifier in your pipeline management tool.\n* `commits`: Required param. Can be a single commit hash or a list if you do not want Plandek to\ncalculate which commits belong to the deployment automatically\n* `environment_name`: Optional param. The name of the environment that the deployment is being made to. If not sent, the environment name will be set to 'not_provided'.\n","operationId":"src.external.deployments.post_operations.post_deployment_mapping","requestBody":{"content":{"application/json":{"examples":{"save mapping for a deployment":{"$ref":"#/components/examples/saveMapping"}},"schema":{"$ref":"#/components/schemas/MappingRequest","x-body-name":"deployment_mapping_data"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"save a deployment":{"$ref":"#/components/examples/saveMappingResponse"}},"schema":{"$ref":"#/components/schemas/MappingResponse"}}},"description":"OK"}},"tags":["Deployments"]}},"/deployments":{"get":{"description":"List any endpoints that match the included parameter filters. You can also filter using partial matches using the character `%` as a wildcard.\nIf you wish to not filter a specific parameter, exclude it from the request.\nFor the time range parameters include a comparison operator like `>` or `<=` followed by the date you wish to filter by, e.g `==2023-12-12T00:00:00Z`.\n","operationId":"src.external.deployments.post_operations.list_deployments","parameters":[{"description":"Required. Has to correspond to your client","in":"query","name":"client_key","required":true,"schema":{"type":"string"},"x-nullable":false},{"description":"Able to be partially matched.","in":"query","name":"pipeline","required":false,"schema":{"type":"string"},"x-nullable":true},{"description":"Able to be partially matched.","in":"query","name":"build","required":false,"schema":{"type":"string"},"x-nullable":true},{"description":"Any commit in the saved deployment object matching the string provided","in":"query","name":"commits","required":false,"schema":{"type":"string"},"x-nullable":true},{"description":"Has to be one of the available options.","in":"query","name":"status","required":false,"schema":{"type":"string"},"x-nullable":true},{"description":"Provide a time range.","in":"query","name":"deployed_at","required":false,"schema":{"format":"date-time-range","type":"string"},"x-nullable":true},{"description":"Provide a time range.","in":"query","name":"commenced_at","required":false,"schema":{"format":"date-time-range","type":"string"},"x-nullable":true},{"description":"Able to be partially matched.","in":"query","name":"branch_name","required":false,"schema":{"type":"string"},"x-nullable":true},{"description":"Able to be partially matched.","in":"query","name":"context","required":false,"schema":{"type":"string"},"x-nullable":true},{"description":"Filter by whether the deployment includes a fix for CFR","in":"query","name":"includes_fix_for_cfr","required":false,"schema":{"type":"boolean"},"x-nullable":true},{"description":"Able to be partially matched.","in":"query","name":"application_or_service_name","required":false,"schema":{"type":"string"},"x-nullable":true},{"description":"Able to be partially matched.","in":"query","name":"application_or_service_release_id","required":false,"schema":{"type":"string"},"x-nullable":true},{"description":"Cannot be partially matched.","in":"query","name":"environment_name","required":false,"schema":{"type":"string"},"x-nullable":true},{"description":"Filter by whether the deployment is to a production environment","in":"query","name":"is_prod_environment","required":false,"schema":{"type":"boolean"},"x-nullable":true},{"description":"Filter by whether the deployment is used to mark commits as deployed","in":"query","name":"use_deployment_to_mark_as_deployed","required":false,"schema":{"type":"boolean"},"x-nullable":true},{"description":"The order of the deployments by deployed date, defaults to `asc` which corresponds to the oldest deployment first. Select between `asc` or `desc`.","in":"query","name":"order","required":false,"schema":{"type":"string"},"x-nullable":true},{"description":"The page of the results, defaults to 1.","in":"query","name":"page","required":false,"schema":{"type":"integer"},"x-nullable":true},{"description":"The number of results per page, defaults to 100. Maximum is 5000.","in":"query","name":"page_size","required":false,"schema":{"type":"integer"},"x-nullable":true},{"description":"Specify the type of the response. Select between `json` or `csv`.","in":"query","name":"response_type","schema":{"enum":["json","csv"],"type":"string"},"x-nullable":false}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentList"}},"text/csv":{"schema":{"type":"string"}}},"description":"Successful operation"}},"tags":["Deployments"]}},"/save":{"get":{"deprecated":true,"description":"* `client_key`: Required param.\n* `access_token`: Required param.\n* `pipeline`: Required param.\n* `status`: Required param. Should be one of: success, failure, rollback, aborted\n* `build`: Optional/Required param. Should be the build identifier in your pipeline management tool. It is optional if you have previously called save_mapping\n* `commit`: Optional/Required param. Commit sha should be the HEAD commit of the release being deployed. It is optional if you have previously called save_mapping.\n* `deployed_at`: Optional Param. (ISO date string including timezone. Defaults to current time if omitted.)\n* `context`: String with any value, which can be used to categorise the deployments. Missing if omitted.","operationId":"src.external.deployments.operations.save","parameters":[{"in":"query","name":"commit","required":false,"schema":{"type":"string"}},{"in":"query","name":"pipeline","required":true,"schema":{"type":"string"}},{"in":"query","name":"build","required":false,"schema":{"type":"string"}},{"in":"query","name":"deployed_at","required":false,"schema":{"format":"date-time","type":"string"}},{"in":"query","name":"context","required":false,"schema":{"type":"string"}},{"in":"query","name":"status","required":false,"schema":{"type":"string"}},{"in":"query","name":"access_token","required":false,"schema":{"type":"string"}},{"in":"query","name":"client_key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveResponse"}}},"description":"OK"},"422":{"$ref":"#/components/responses/UNPROCESSABLE_ENTITY"},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"summary":"Save data about a deployment into the db","tags":["Original Deployments"]}},"/save_commencement":{"get":{"deprecated":true,"description":"On completion of the deployment, call the existing `/save` endpoint as usual.\n\n\nThe API uses the pipeline and build /commit/branch_name  fields to link the deployment with the commencement.\nThe pipeline must match and at least one of build/commit/branch_name must match also. Where there are multiple\nmatching commencements (for example a commencement was saved with a build and another with a commit) then the\nmost recently updated commencement is used.\n\n\nThe `/save` method can also accept a commenced_at parameter. If this is provided, then there is no need to make\nthe `/save_commencement` request.\n\n* `client_key`: Required param\n* `access_token`: Required param\n* `pipeline`: Required param\n* `build`: Optional, at least one of `build`, `commit` or `branch_name` must be provided\n* `commit`:  Optional, at least one of `build`, `commit` or `branch_name` must be provided\n* `branch_name`:  Optional, at least one of `build`, `commit` or `branch_name` must be provided\n* `commenced_at`: ISO date string including timezome. Defaults to current time if ommitted","operationId":"src.external.deployments.operations.save_commencement","parameters":[{"in":"query","name":"commit","required":false,"schema":{"type":"string"}},{"in":"query","name":"pipeline","required":true,"schema":{"type":"string"}},{"in":"query","name":"build","required":false,"schema":{"type":"string"}},{"in":"query","name":"commenced_at","required":false,"schema":{"format":"date-time","type":"string"}},{"in":"query","name":"branch_name","required":false,"schema":{"type":"string"}},{"in":"query","name":"access_token","required":false,"schema":{"type":"string"}},{"in":"query","name":"client_key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommencementResponse"}}},"description":"OK"},"422":{"$ref":"#/components/responses/UNPROCESSABLE_ENTITY"},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"summary":"Save the commencement time of a deployment","tags":["Original Deployments"]}},"/save_mapping":{"get":{"deprecated":true,"description":"By saving a mapping using `/save_mapping`, future requests to `/save` can omit one of build or commit.\n\n\nA subsequent request to `/save` with no commit value and `build=mybuild` would assume a commit value of `a1b2c3d4`.\n\n\nSimilarly, a subsequent request to `/save` with no build value and `commit=a1b2c3d4` would assume a build value of `mybuild`.\n\n\nMappings are unique, and further requests to /save_mapping with matching build or commit values will overwrite old data.\n\n* `client_key`: Required param\n* `access_token`: Required param\n* `pipeline`: Required param\n* `commit`: Required param\n* `build`: Required param","operationId":"src.external.deployments.operations.save_mapping","parameters":[{"in":"query","name":"commit","required":true,"schema":{"type":"string"}},{"in":"query","name":"pipeline","required":true,"schema":{"type":"string"}},{"in":"query","name":"build","required":true,"schema":{"type":"string"}},{"in":"query","name":"access_token","required":false,"schema":{"type":"string"}},{"in":"query","name":"client_key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MappingResponse"}}},"description":"OK"},"422":{"$ref":"#/components/responses/UNPROCESSABLE_ENTITY"},"default":{"$ref":"#/components/responses/DEFAULT_ERROR"}},"summary":"Save data about a build - commit mapping into the db","tags":["Original Deployments"]}},"/update_deployment":{"post":{"description":"You can update some fields of an existing deployment record. The fields that can be updated are marked as *updateable*\n\n__JSON body__\n* `client_key`: Required. Unique to the client and cannot be changed\n\n* `pipeline`: Required. Used to identify the deployment and cannot be changed\n\n* `build`: Required. Can be omitted only if there exists a build-commit and `commits` is provided. Used to identify the deployment and cannot be changed\n\n* `environment_name`: Optional. Defaults to `not_provided`. Used to identify the deployment and cannot be changed\n\n* `commits`:  Optional. Include this if `build` is not included and there exists a build-commit mapping. Used to identify the deployment and cannot be changed\n\n* `status`: Optional, Updateable\n\n* `branch_name`:  Optional, Updateable\n\n* `context`: Optional, Updateable\n\n* `commenced_at`: Optional, Updateable\n\n* `attributes`: Optional, Updateable. The dictionary provided will either update the values of keys if they already exist or create new key-value pairs if they do not.\n\n* `includes_fix_for_cfr`: Optional, Updateable\n\n* `application_or_service_name`: Optional, Updateable. Can only be updated if `application_or_service_release_id` is set.\n\n* `application_or_service_release_id`: Optional, Updateable. Can only be updated if `application_or_service_name` is set.\n\n* `is_prod_environment`: Optional, Updateable. Can only be updated if `environment_name` is set.\n","operationId":"src.external.deployments.post_operations.post_update_deployment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRequest","x-body-name":"deployment_data"}}}},"responses":{"200":{"content":{"application/json":{"examples":{"update a deployment response":{"$ref":"#/components/examples/saveDeploymentResponse"}},"schema":{"$ref":"#/components/schemas/SaveResponse"}}},"description":"Successful operation"}},"tags":["Deployments"]}}},"servers":[{"url":"/deployments/v1"}],"tags":[{"description":"Everything about your deployments","name":"Deployments"},{"description":"Everything about your deployments","name":"Original Deployments"}]}
