components: parameters: PreferParam: description: Specifies the API profile that server should use to handle this request. For the list of supported profiles check out the Scalr documentation. explode: false in: header name: Prefer required: true schema: default: profile=preview type: string schemas: AccessPolicy: description: |- Grants the permissions declared in a role to a user, team, or service account. An access policy is applied to an environment or a specific workspace. properties: attributes: properties: is-system: description: The access policy is a built-in read-only policy that cannot be updated or deleted. readOnly: true type: boolean type: object id: readOnly: true type: string links: additionalProperties: type: string type: object relationships: properties: account: description: Grant access to the account and to all environments and workspaces in the account. properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object environment: description: Grant access to the environment and all workspaces within it. properties: data: nullable: true properties: id: type: string type: enum: - environments type: string required: - type - id type: object required: - data type: object roles: description: The roles with permissions. properties: data: items: properties: id: type: string type: enum: - roles type: string required: - type - id type: object type: array required: - data type: object service-account: description: Role binding to a service account. properties: data: nullable: true properties: id: type: string type: enum: - service-accounts type: string required: - type - id type: object required: - data type: object team: description: Role binding to a team. properties: data: nullable: true properties: id: type: string type: enum: - teams type: string required: - type - id type: object required: - data type: object user: description: Role binding to a user. properties: data: nullable: true properties: id: type: string type: enum: - users type: string required: - type - id type: object required: - data type: object workspace: description: Grant access to the workspace. properties: data: nullable: true properties: id: type: string type: enum: - workspaces type: string required: - type - id type: object required: - data type: object required: - roles type: object type: enum: - access-policies type: string required: - type - relationships type: object AccessPolicyDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/AccessPolicy' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object AccessPolicyListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/AccessPolicy' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object AccessToken: description: Access Token for the Scalr API. properties: attributes: properties: created-at: description: Date/Time the token was created. format: date-time readOnly: true type: string description: description: The description of the token. maxLength: 255 nullable: true type: string last-used-at: description: Date/Time when the token was last used. format: date-time nullable: true readOnly: true type: string token: description: |- The JWT token which an API client should pass in the `Authorization: Bearer ` header. Available only in the [Create an Access Token](#create-an-access-token) response. nullable: true readOnly: true type: string type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: created-by: description: The user who created the token. properties: data: nullable: true properties: id: type: string type: enum: - users type: string required: - type - id type: object readOnly: true required: - data type: object type: object type: enum: - access-tokens type: string required: - type type: object AccessTokenDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/AccessToken' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object AccessTokenListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/AccessToken' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object Account: description: API Resource for the account. properties: attributes: properties: allowed-ips: description: The list of allowed IP networks for IP fencing items: format: ipv4network type: string type: array created-at: format: date-time readOnly: true type: string last-login-attempt-at: deprecated: true format: date-time nullable: true readOnly: true type: string login-attempts: deprecated: true nullable: true readOnly: true type: integer name: description: The name of the account maxLength: 255 type: string quotas: description: The list of account's quotas properties: agents: description: The maximal number of agents type: integer before-after-hooks-available: description: Indicates if the before-after hooks are available for an account type: boolean cost-estimate-available: description: Indicates if the cost estimation is available for an account type: boolean environments: description: The maximal number of environments type: integer max-concurrent-runs: description: The maximal number of concurrent runs type: integer policy-group-checks-available: description: Indicates if the policy group checks are available for an account type: boolean policy-groups: description: The maximal number of policy groups type: integer registry-modules: description: The maximal number of registry modules type: integer registry-templates: description: The maximal number of registry templates type: integer run-triggers: description: The maximal number of run triggers type: integer service-accounts-available: description: Indicates if the service accounts are available for an account type: boolean sso-available: description: Indicates if the SSO is available for an account type: boolean users: description: The maximal number of users type: integer vcs-providers: description: The maximal number of VCS providers type: integer workspaces: description: The maximal number of workspaces type: integer type: object support-access-enabled: default: true description: If enabled, Scalr support staff will be able to access the account for troubleshooting purposes. type: boolean required: - name type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: billing-plan: description: The billing plan of this account properties: data: nullable: true properties: id: type: string type: enum: - billing-plans type: string required: - type - id type: object readOnly: true required: - data type: object identity-provider: description: The identity provider of this account properties: data: nullable: true properties: id: type: string type: enum: - identity-providers type: string required: - type - id type: object required: - data type: object owner: description: The user that owns this account properties: data: properties: id: type: string type: enum: - users type: string required: - type - id type: object required: - data type: object required: - owner type: object type: enum: - accounts type: string required: - type - attributes - relationships type: object AccountBlobSettings: description: |- API resource describing the external blob storage setting, where Scalr will store this account blobs: e.g. source code, terraform state, and logs. properties: attributes: properties: created-at: description: The resource creation timestamp. format: date-time readOnly: true type: string error-message: description: This field contains the last error description, when these settings doesn't work properly. readOnly: true type: string google-credentials: description: |- Service Account JSON key. Required IAM roles: `Storage Admin` assigned on a `google-storage-bucket` bucket. See: [use IAM with bucket](https://cloud.google.com/storage/docs/access-control/using-iam-permissions#bucket-iam). format: password type: object google-encryption-key: description: |- Optional [customer supplied encryption key](https://cloud.google.com/storage/docs/encryption/customer-supplied-keys). Must be exactly 32 bytes, encoded into base64: ```sh $ openssl rand 32 | base64 NfsPPHBVNlU8ZLBU9BeBIoL29rqtduyQAEw3vxf6kaY= ``` format: password type: string google-project: description: Google Cloud project ID. type: string google-storage-bucket: description: Google Storage bucket name. Bucket must already exist. maxLength: 222 type: string updated-at: description: The resource last update timestamp. format: date-time readOnly: true type: string required: - google-storage-bucket - google-credentials type: object id: readOnly: true type: string links: additionalProperties: type: string type: object type: enum: - account-blob-settings type: string required: - type - attributes type: object AccountBlobSettingsDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/AccountBlobSettings' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object AccountDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/Account' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object AccountListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/Account' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object AccountMetrics: description: Represents account metrics. properties: billings-flex-runs-count: type: integer billings-flex-runs-minutes-count: type: integer billings-run-minutes-count: type: integer billings-runs-count: type: integer environments-count: type: integer quota-max-concurrency: type: integer runs-awaiting-confirmation: type: integer runs-concurrency: type: integer runs-count: type: integer runs-failed: type: integer runs-queue-size: type: integer runs-successful: type: integer workspaces-count: type: integer required: - workspaces-count - runs-count - environments-count - runs-awaiting-confirmation - runs-failed - runs-successful - runs-concurrency type: object AccountUser: description: Represents an account-user relation. properties: attributes: properties: status: description: 'The relation status. Can be: `Active`, `Inactive`, `Pending`.' enum: - Active - Inactive - Pending type: string type: object id: readOnly: true type: string links: additionalProperties: type: string type: object relationships: properties: account: properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object teams: properties: data: items: properties: id: type: string type: enum: - teams type: string required: - type - id type: object nullable: true type: array required: - data type: object user: properties: data: nullable: true properties: id: type: string type: enum: - users type: string required: - type - id type: object required: - data type: object type: object type: enum: - account-users type: string required: - type type: object AccountUserDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/AccountUser' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object AccountUserListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/AccountUser' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object Agent: description: |- An agent represents a single instance of self-hosted runner installed on a customer's on-prem infrastructure. An agent resource is automatically created when [self-hosted runner](../../agent_pools.html) connects to the API server to join it [agent pool](agent-pools.html). In order to connect to the pool, the runner requires an [agent pool token](access-tokens.html#create-an-agent-pool-access-token). properties: attributes: properties: created-at: description: The resource creation timestamp. format: date-time readOnly: true type: string error-message: description: Contains the error message if the agent is in an `errored` status. nullable: true readOnly: true type: string last-seen-at: description: The timestamp when the agent was last seen online. format: date-time readOnly: true type: string name: description: The name of the agent. This must be unique within the agent pool. maxLength: 64 type: string os: description: 'The agent''s OS distribution name and version (ex: `centos_8`, `ubuntu_20`)' maxLength: 64 type: string status: description: |- The agent's current status * `busy` - The agent is working on a task. * `errored` - The agent has an error and can't operate correctly. The attribute `error-message` has the details. * `idle` - The agent is idle and ready to start working on a task. * `offline` - API server hasn't seen the agent's heartbeat for 30 seconds. enum: - idle - busy - offline - errored readOnly: true type: string version: description: The agent's version. readOnly: true type: string required: - name - os type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: pool: description: The agent pool this agent is a member of. properties: data: nullable: true properties: id: type: string type: enum: - agent-pools type: string required: - type - id type: object readOnly: true required: - data type: object type: object type: enum: - agents type: string required: - type - attributes type: object AgentDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/Agent' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object AgentListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/Agent' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object AgentPool: description: |- With the agent pool resource you can manage a pool of [self-hosted agents](../../agent_pools.html) A workspace may be configured to use an agent pool to execute terraform [runs](runs.html). Agents could be hosted on a physical or virtual machines within the customer's network. properties: attributes: properties: name: description: |- The name of the agent pool. This must be unique within a Scalr scope (e.g. account or environment). maxLength: 64 type: string vcs-enabled: default: false description: Indicates whether the VCS support is enabled for agents in the pool. type: boolean required: - name type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: account: description: The account the agent pool belongs to. properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object agents: description: The list of agents connected to the pool. properties: data: items: properties: id: type: string type: enum: - agents type: string required: - type - id type: object nullable: true type: array readOnly: true required: - data type: object environment: description: The environment the agent pool belongs to. properties: data: nullable: true properties: id: type: string type: enum: - environments type: string required: - type - id type: object required: - data type: object workspaces: description: The list of workspaces attached to the pool. Can be used to bulk link/unlink workspaces. properties: data: items: properties: id: type: string type: enum: - workspaces type: string required: - type - id type: object nullable: true type: array required: - data type: object type: object type: enum: - agent-pools type: string required: - type - attributes type: object AgentPoolDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/AgentPool' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object AgentPoolListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/AgentPool' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object Apply: description: |- Applies are the details of a request to apply a Terraform plan. An apply may or may not be successful as indicated by the `status` attribute. properties: attributes: properties: execution-details: additionalProperties: type: string description: Apply execution details. type: object resource-additions: description: The number of resources added. nullable: true type: integer resource-changes: description: The number of resources updated. nullable: true type: integer resource-destructions: description: The number of resources destroyed. nullable: true type: integer status: description: |- The Apply's current status. Transient states: * `pending` - Apply has been created but not yet `queued`. * `queued` - Queued and waiting for capacity/and or quota to be available. * `running` - Running. Final states: * `canceled` - Apply canceled in some way. * `errored` - An error occurred during the apply. See `output` for details. * `finished` - Apply completed successfully. * `unreachable` - Apply will not be run. enum: - pending - queued - running - finished - canceled - errored - unreachable type: string status-timestamps: additionalProperties: format: date-time type: string description: Date/Time of transition to each status that has occurred. type: object type: object id: readOnly: true type: string links: properties: output: description: URL to download the apply output. nullable: true type: string self: type: string readOnly: true type: object type: enum: - applies type: string required: - type type: object ApplyDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/Apply' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object BillingPlan: properties: attributes: properties: amount: type: integer included-runs: nullable: true type: integer included-runs-minutes: nullable: true type: integer plan-type: enum: - monthly - yearly - deprecated-yearly type: string prices: items: properties: amount: nullable: true type: integer currency: type: string interval: type: string type: enum: - membership - pre-paid-runs - flex-runs - flex-runs-minutes type: string unit-label: nullable: true type: string required: - currency - type - interval type: object type: array type: object id: readOnly: true type: string links: additionalProperties: type: string type: object relationships: properties: tier: properties: data: nullable: true properties: id: type: string type: enum: - billing-tiers type: string required: - type - id type: object required: - data type: object type: object type: enum: - billing-plans type: string required: - type type: object BillingPlanDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/BillingPlan' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object BuiltInProviderTypes: enum: - aws - azurerm - google - scalr type: string Comment: description: An optional explanation for why run action was done. properties: comment: default: '' description: The reason. type: string type: object ConfigurationVersion: description: |- A Configuration Version describes the version of a Terraform configuration files. Each run is associated with a configuration version. It provides details of the source of the configuration files, the upload status, and the relationships to VCS and the workspace. properties: attributes: properties: auto-queue-runs: description: Indicates if a run should automatically be queued when the configuration has been uploaded. type: boolean created-at: description: Date/Time the configuration version was created. format: date-time readOnly: true type: string error-message: description: |- This field contains the error description, when this configuration version's status is `errored`. nullable: true readOnly: true type: string inputs: default: [] description: |- The input variables definitions. Example: ```js [ { "description": "The name of the CloudSQL database.", "name": "cloudsql_database", "type": "string" }, {"...": ""..."} ] ``` items: anyOf: - $ref: '#/components/schemas/RegistryInputOptional' - $ref: '#/components/schemas/RegistryInputRequired' readOnly: true type: array is-dry: description: |- Indicates the configuration version can only be used to perform dry runs that comprise the plan, cost estimation (if enabled) and policy checks. With this set to `true` the configuration cannot be used for an apply and never requires confirmation. type: boolean size: description: A blob size in bytes. nullable: true readOnly: true type: integer source: description: The origin for the configuration version. readOnly: true type: string status: description: |- The Configuration version's current status. * `pending` - waiting for the configuration files to upload. * `uploaded` - upload successful. At this point if the `auto-queue-runs: true` the new run should be `queued`. * `errored` - uploaded files post processing failed. Attribute `error-message` contains the details. enum: - errored - pending - uploaded readOnly: true type: string status-timestamps: additionalProperties: format: date-time type: string description: Date/Time of transition to each status that has occurred. readOnly: true type: object type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string upload: description: URL for terraform configuration templates upload, that could be used to `PUT` a tar.gz archive of a local workspace directory. Available only in the create `configuration-versions` response. nullable: true readOnly: true type: string readOnly: true type: object relationships: properties: vcs-revision: description: When configuration version was uploaded from a VCS, this relation points to the Git commit information properties: data: nullable: true properties: id: type: string type: enum: - vcs-revisions type: string required: - type - id type: object readOnly: true required: - data type: object workspace: description: The workspace the configuration version belongs to. properties: data: nullable: true properties: id: type: string type: enum: - workspaces type: string required: - type - id type: object required: - data type: object type: object type: enum: - configuration-versions type: string required: - type type: object ConfigurationVersionDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/ConfigurationVersion' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object ConfigurationVersionListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/ConfigurationVersion' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object ConfirmRequest: description: A request to confirm a run. Includes optional time when apply should be queued. properties: apply-at: description: The UTC datetime at which the Apply should be queued. format: date-time nullable: true type: string comment: default: '' description: The reason. type: string type: object CostEstimate: description: |- A Cost Estimate is the details of the cost estimation phase of a `run` in Scalr. Cost estimation is optional and is enabled/disable per `environment`. If enabled a cost estimation is performed immediately after Terraform plan has completed for every run in every workspace, including dry runs. properties: attributes: properties: delta-monthly-cost: default: '0.000' description: The change in the estimated cost ($) from the previous run (if any). type: string error-message: description: When the cost estimate status is `errored`, this field contains the error description. nullable: true type: string matched-resources-count: description: |- The number of resources in the terraform plan, that were included into the estimation. Cost estimation in Scalr supports a number of terraform resources from major [cloud providers](https://docs.scalr.io/docs/cost-estimation) nullable: true type: integer prior-monthly-cost: default: '0.000' description: The estimated current monthly cost ($). type: string proposed-monthly-cost: default: '0.000' description: The estimated monthly cost ($) if the plan is applied. type: string resources-count: description: The total number of resources in the terraform plan. nullable: true type: integer status: description: |- The Cost estimate's current status. Transient states: * `pending` - Cost estimation has been created but not yet `queued`. * `queued` - Queued and waiting for capacity to be available. Final states: * `canceled` - The cost estimate has been canceled. * `errored` - The cost estimate has finished with an error. Attribute `error-message` contains the details. * `finished` - The cost estimate has completed successfully. * `unreachable` - The cost estimate will not run. enum: - pending - queued - finished - canceled - errored - unreachable type: string status-timestamps: additionalProperties: format: date-time type: string description: Date/Time of transition to each status that has occurred. type: object unmatched-resources-count: description: The number of resources in the terraform plan that were excluded from the estimation. nullable: true type: integer type: object id: readOnly: true type: string links: properties: breakdown: description: Link to download the cost breakdown [JSON formatted output](https://www.infracost.io/docs/multi_project/report/#examples). nullable: true type: string output: description: Link to download the raw output of the cost estimation. nullable: true type: string self: type: string readOnly: true type: object type: enum: - cost-estimates type: string required: - type type: object CostEstimateDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/CostEstimate' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object CreateUser: description: Represents a request to create an [IAM](https://docs.scalr.io/docs/identity-and-access-management) user. properties: attributes: properties: change-password-on-sign-in: default: false description: If set to `true`, the user will be asked to change the temporary password on the first sign in. type: boolean created-at: format: date-time nullable: true type: string email: maxLength: 255 type: string full-name: maxLength: 100 nullable: true type: string password: description: Must be at least 8 characters long and contain at least one digit, one lowercase letter, one uppercase letter, and one special character. maxLength: 64 type: string status: description: 'User status. Can be: `Active`, `Inactive`, `Pending`. Pending user will be activated after the first sign in.' enum: - Active - Inactive - Pending type: string required: - email type: object id: readOnly: true type: string links: properties: self: type: string readOnly: true type: object relationships: properties: identity-providers: properties: data: items: properties: id: type: string type: enum: - identity-providers type: string required: - type - id type: object nullable: true type: array required: - data type: object type: object type: enum: - users type: string required: - type - attributes type: object CreateUserDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/CreateUser' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object Endpoint: description: |- Endpoint is the destination for webhooks. It has URL, secret key and timeout/retry settings. The main use-case of endpoint is to configure it once on higher scope (e.g account/environments), and then re-use in many webhook configurations on a lower scopes (e.g. environments/workspaces). properties: attributes: properties: max-attempts: default: 3 description: The number of retry attempts. type: integer name: description: The name of the endpoint. maxLength: 255 type: string permissions: readOnly: true type: object secret-key: description: The secret passphrase for HMAC signature. maxLength: 1024 type: string timeout: default: 15 description: The HTTP transaction timeout. type: integer url: description: HTTP(s) destination URL. maxLength: 2048 type: string required: - name - url type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: account: description: The account, this endpoint belongs to. properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object readOnly: true required: - data type: object environment: description: The environment, this endpoint belongs to. properties: data: nullable: true properties: id: type: string type: enum: - environments type: string required: - type - id type: object required: - data type: object type: object type: enum: - endpoints type: string required: - type - attributes type: object EndpointDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/Endpoint' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object EndpointListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/Endpoint' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object Environment: description: |- Environments are collections of related workspaces that correspond to functional areas, SDLC stages, projects or any grouping that is required. An account can have multiple environments. Workspaces within an environment are where Terraform configurations are run to deploy infrastructure, and where state files are stored. An Environment can have set of policy groups assigned that are applied to all workspaces in the environment. The Environment can also have variables, credentials, registry modules, and VCS providers that are available to every workspace. properties: attributes: properties: cost-estimation-enabled: default: true description: Indicates if the cost estimation should be performed for `runs` in the environment. type: boolean created-at: description: Date/Time the environment was created. format: date-time readOnly: true type: string created-by-email: nullable: true readOnly: true type: string name: description: The name of the environment. maxLength: 255 type: string permissions: readOnly: true type: object status: readOnly: true type: string required: - name type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: account: description: The account that owns this environment. properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object readOnly: true required: - data type: object created-by: description: The user that created the environment. properties: data: nullable: true properties: id: type: string type: enum: - users type: string required: - type - id type: object readOnly: true required: - data type: object default-provider-configurations: description: Provider configurations used in the environment workspaces by default. properties: data: items: properties: id: type: string type: enum: - provider-configurations type: string required: - type - id type: object nullable: true type: array required: - data type: object policy-groups: properties: data: items: properties: id: type: string type: enum: - policy-groups type: string required: - type - id type: object nullable: true type: array required: - data type: object provider-configurations: description: Provider configurations available for this environment. properties: data: items: properties: id: type: string type: enum: - provider-configurations type: string required: - type - id type: object nullable: true type: array readOnly: true required: - data type: object tags: properties: data: items: properties: id: type: string type: enum: - tags type: string required: - type - id type: object nullable: true type: array required: - data type: object type: object type: enum: - environments type: string required: - type - attributes type: object EnvironmentDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/Environment' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object EnvironmentListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/Environment' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object Error: description: |- JSON:API Error object. see: https://jsonapi.org/format/#errors properties: code: type: string detail: type: string meta: type: object source: properties: pointer: type: string type: object status: type: string type: object ErrorDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: errors: items: $ref: '#/components/schemas/Error' type: array type: object EventDefinition: description: |- Represents a Webhook Event Definition. Use [List Event Definitions](event-definitions.html#list-event-definitions) to obtain the all Scalr events available for use in webhooks. Then pass a number of the event IDs within `webhook.event` relationship in [Create Webook](webhooks.html#create-webhook) or [Update Webhook](webhooks.html#update-webhook). properties: attributes: properties: description: description: The event details. nullable: true type: string name: description: The name of the event. maxLength: 64 type: string required: - name type: object id: readOnly: true type: string links: additionalProperties: type: string type: object type: enum: - event-definitions type: string required: - type - attributes type: object EventDefinitionListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/EventDefinition' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object IdentityProvider: description: The Identity Provider (IdP). properties: attributes: properties: idp-type: description: The IdP type. Can be one of `scalr`, `ldap`, or `saml`. enum: - scalr - ldap - saml type: string name: description: The IdP name. maxLength: 255 type: string verification-status: description: Represents the verification status with the external IdP (SAML/LDAP only) enum: - pending - success - running type: string type: object id: readOnly: true type: string links: properties: self: type: string readOnly: true type: object relationships: properties: account: description: The account this IdP belongs to. properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object type: object type: enum: - identity-providers type: string required: - type type: object IdentityProviderDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/IdentityProvider' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object Module: description: A terraform module in the [Private Module Registry](../../module.html). properties: attributes: properties: created-at: description: The resource creation timestamp. format: date-time readOnly: true type: string description: description: |- The description of the module. By default, this is taken from the VCS repository description. For mono repos you likely want to override this behavior by passing this argument in a [Create Module](modules.html#create-a-module) operation. readOnly: true type: string error-message: description: This field contains the error description, when this module's status is `errored`. nullable: true readOnly: true type: string name: description: The module name. readOnly: true type: string provider: description: |- A name of a system, this module was written for. For multi-cloud modules this argument should match terraform provider name (ex: `aws` or `google`), in other cases the convention is to name it `system` readOnly: true type: string source: default: '' description: The `source` by which the module should be addressed from a HCL template. readOnly: true type: string status: description: |- The Module's current status. Initial status: * `pending` - The initial status of a module once it has been created. Now Scalr will download the code from the VCS, and create a `module-version` resource for each matching Git tag. Ending statuses: * `no_version_tags` - a Module has been created, however the Module source repository has no tags. * `setup_complete` - a Module has been created, and at least one ModuleVersion has been successfully uploaded. Scalr assigns this status while some module-versions upload might be still in-progress. If you want to ensure a specific version was uploaded, you can poll [List Module Versions](module-versions.html#list-module-versions) for the `ok` status. * `errored` - Module has been created, however its synchronization has failed. Attribute `error-message` contains the details. enum: - no_version_tags - pending - setup_complete - errored readOnly: true type: string vcs-repo: properties: identifier: description: |- A reference to the module's VCS repository. For GitHub, GitHub Enterprise and GitLab the format is `/`. Azure DevOps Services has the format `//`. type: string path: description: |- The repository sub-directory where the module source is located. If omitted or submitted as an empty string, this defaults to the repository's root. maxLength: 255 type: string tag-prefix: description: |- Specify this attribute when a module's releases are namespaced within a repository's Git tags. This is usually the case for a mono repos with individually versioned components. For example if your module is tagged `my-module/v1.0.0` it's `tag_prefix` is `my-module/`. maxLength: 255 type: string required: - identifier type: object required: - vcs-repo type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: account: description: The account this module belongs to. properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object created-by: description: The user who has created the module. properties: data: nullable: true properties: id: type: string type: enum: - users type: string required: - type - id type: object readOnly: true required: - data type: object environment: description: The environment this module belongs to. properties: data: nullable: true properties: id: type: string type: enum: - environments type: string required: - type - id type: object required: - data type: object latest-module-version: description: The module's latest version. properties: data: nullable: true properties: id: type: string type: enum: - module-versions type: string required: - type - id type: object readOnly: true required: - data type: object module-version: description: The module's latest successful version. properties: data: nullable: true properties: id: type: string type: enum: - module-versions type: string required: - type - id type: object readOnly: true required: - data type: object module-versions: description: The IDs of the module versions. properties: data: items: properties: id: type: string type: enum: - module-versions type: string required: - type - id type: object nullable: true type: array readOnly: true required: - data type: object vcs-provider: description: The module's VCS provider. properties: data: properties: id: type: string type: enum: - vcs-providers type: string required: - type - id type: object required: - data type: object required: - vcs-provider type: object type: enum: - modules type: string required: - type - attributes - relationships type: object ModuleDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/Module' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object ModuleListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/Module' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object ModuleResyncRequest: description: Represents a request to resync the object. properties: force: default: false description: |- Force resync module. If not equal to "true", only versions that did not exist before will be synchronized. type: boolean type: object ModuleUsageNamespace: description: Represents terraform module usage namespace instance. properties: attributes: properties: namespace-name: description: Name of the namespace maxLength: 255 type: string source: maxLength: 255 type: string type: object id: readOnly: true type: string links: additionalProperties: type: string type: object relationships: properties: account: description: The account this usage instance belongs to. properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object namespace-account: description: Filled when namespace is a scalr account properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object namespace-environment: description: Namespace of module the Scalr module. properties: data: nullable: true properties: id: type: string type: enum: - environments type: string required: - type - id type: object required: - data type: object type: object type: enum: - tf-module-namespaces type: string required: - type type: object ModuleUsageNamespaceDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/ModuleUsageNamespace' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object ModuleUsageNamespaceListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/ModuleUsageNamespace' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object ModuleVersion: description: A terraform module's version in the [Private Module Registry](../../module.html). properties: attributes: properties: created-at: description: The resource creation timestamp. format: date-time readOnly: true type: string dependencies: additionalProperties: anyOf: - type: string - type: object - items: {} type: array description: The list of modules this version depends on. nullable: true readOnly: true type: object details: description: |- README contents. This file should be named README or README.md. The latter will be processed as [CommonMark](https://commonmark.org/). nullable: true readOnly: true type: string error-message: description: |- This field contains the error description, when this module version's status is `errored`. nullable: true readOnly: true type: string inputs: description: Input Variables. items: anyOf: - $ref: '#/components/schemas/RegistryInputOptional' - $ref: '#/components/schemas/RegistryInputRequired' nullable: true readOnly: true type: array is-root-module: description: |- Module version marked as root will allow the [creation of workspaces](../../module.html#deployable-modules) directly from the registry, as well as standard module usage. readOnly: true type: boolean outputs: description: Output Values. items: properties: description: default: '' type: string name: default: '' type: string sensitive: default: false type: boolean value: anyOf: - type: string - type: object - items: {} type: array default: '' nullable: true type: object nullable: true readOnly: true type: array resources: description: Declared resources. items: properties: address: default: '' type: string type: default: '' type: string type: object nullable: true readOnly: true type: array size: description: A blob size in bytes. nullable: true readOnly: true type: integer status: description: |- The module version's current status. Initial status: * `not_uploaded` - Module version has been created, however the code has not been uploaded. Transitional statuses: * `pending` - Module version has been created and is currently synchronizing. * `pending_delete` - Module version has been deleted from the repository and pending deletion from the registry. Ending statuses: * `ok` - Module version has been created and the code has been uploaded. * `errored` - Module version has been created, however its synchronization has failed. Attribute `error-message` contains the details. enum: - not_uploaded - pending - ok - errored - pending_delete readOnly: true type: string version: description: Semantic Version. maxLength: 64 type: string required: - version type: object id: readOnly: true type: string links: properties: download: description: The URL to download the tar.gz archive with module version source code. nullable: true readOnly: true type: string self: readOnly: true type: string readOnly: true type: object relationships: properties: module: description: The module this version belongs to. properties: data: properties: id: type: string type: enum: - modules type: string required: - type - id type: object required: - data type: object vcs-revision: description: The Git commit information when the module version was uploaded from a VCS. properties: data: nullable: true properties: id: type: string type: enum: - vcs-revisions type: string required: - type - id type: object readOnly: true required: - data type: object required: - module type: object type: enum: - module-versions type: string required: - type - attributes - relationships type: object ModuleVersionDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/ModuleVersion' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object ModuleVersionListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/ModuleVersion' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object Permission: description: |- The ability to perform an action on an object, enabling the corresponding functionality in the UI and API. e.g. `workspaces:create`, `vcs-providers:read`. The ID of a permission consist of two parts separated with `:` (colon): * Resource type in a plural form. * Action name. Generally the actions are CRUD, but some objects have specific actions, such as `runs:cancel`. If an `*` (asterisk) is used instead of the action name in the permission it means the permission allows all actions for the specified resource type. For example `workspaces:*` allows all actions with workspaces. An asterisk can be also used instead of the resource type. For example permission `*:read` gives read access to all resources. `*:*` - gives access to everything. Use [List Permissions](permissions.html#list-permissions) to obtain all possible permissions. properties: attributes: properties: applicable-scopes: description: Scope identities, this permission could be applied to in an [access policy](access-policies.html). items: enum: - account - environment - workspace type: string type: array description: description: Permission description. nullable: true type: string type: object id: readOnly: true type: string links: additionalProperties: type: string type: object type: enum: - permissions type: string required: - type type: object PermissionDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/Permission' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object PermissionListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/Permission' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object Plan: description: Provides details of a Terraform plan operation. properties: attributes: properties: execution-details: additionalProperties: type: string description: Plan execution details. type: object has-changes: description: Indicates if plan has proposed resource changes. type: boolean resource-additions: description: The number of new resources that will be added. nullable: true type: integer resource-changes: description: The number of resources that will be updated in place. nullable: true type: integer resource-destructions: description: The number of resources that will be destroyed. nullable: true type: integer status: description: |- The Plan's current status. Transient states: * `pending` - Plan has been created but not yet queued. * `queued` - Queued and waiting for capacity/and or quota to be available. * `running` - Running. Final states: * `canceled` - Plan canceled in some way. * `errored` - An error occurred during the plan. See `output` for details. * `finished` - Plan completed successfully. * `unreachable` - Plan will not be run. enum: - pending - queued - running - finished - canceled - errored - unreachable type: string status-timestamps: additionalProperties: format: date-time type: string description: Date/Time of transition to each status that has occurred. type: object type: object id: readOnly: true type: string links: properties: json-output: description: URL to retrieve the JSON execution plan nullable: true type: string output: description: Link to download the raw output of the terraform plan. nullable: true type: string self: type: string readOnly: true type: object type: enum: - plans type: string required: - type type: object PlanDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/Plan' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object Policy: description: |- A policy provides details of a single OPA policy as declared in [scalr-policy.hcl](../../opa.html#creating-policy-groups). properties: attributes: properties: enabled: default: true description: If set to `false`, the policy will not be evaluated during a run. readOnly: true type: boolean enforced-level: description: |- The policy's enforcement level. * `hard-mandatory` - cannot be overridden. * `soft-mandatory` - can be overridden through an approval by account admins and other authorized roles. * `advisory` - provides a warning only. enum: - hard-mandatory - soft-mandatory - advisory readOnly: true type: string name: description: The name of the policy. type: string type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: policy-group: description: The policy group this policy belongs to. properties: data: nullable: true properties: id: type: string type: enum: - policy-groups type: string required: - type - id type: object readOnly: true required: - data type: object type: object type: enum: - policies type: string required: - type type: object PolicyCheck: description: |- A policy check contains the details of the policy check phase of a run in Scalr. Policy check is performed immediately after Terraform plan and cost estimation have completed for every run in every workspace, including dry runs, where policies have been linked. properties: attributes: properties: permissions: type: object result: description: OPA policy decision. properties: advisory-failed: default: 0 description: Number of policy checks that have failed with 'advisory' level. type: integer duration-ms: default: 0 description: Duration of the policy check operation. type: integer hard-failed: default: 0 description: Number of policy checks that have failed with "hard-mandatory" level. type: integer passed: default: 0 description: Number of policy checks that have passed. type: integer policies: default: [] description: List of policies that were checked. items: properties: messages: default: [] items: type: string type: array name: type: string result: enum: - passed - hard_failed - soft_failed - advisory_failed type: string required: - name - result type: object type: array result: default: false description: Indicates whether all policy checks have passed without failures. type: boolean soft-failed: default: 0 description: Number of policy checks that have failed with "soft-mandatory" level. type: integer total-failed: default: 0 description: Total number of policy checks that have failed. type: integer type: object status: description: |- The Policy checks's current status. Transient states: * `pending` - The initial status of a policy check once it has been created. * `queued` - The policy check has been queued, awaiting backend service capacity to run terraform. * `running` - The policy check is running. * `soft_failed` Policy check has finished, and run hasn't passed policy with the `soft` level. User having `policy-checks:override` permission can overide the policy check decision, and push this run next to apply. Final states: * `canceled` - The policy check has been canceled. * `errored` - The policy check has finished with an error. Attribute `error-message` contains the details. * `hard_failed` - Run hasn't passed policy with the `hard` level. * `overridden` - The policy check `soft_failed` status has been overriden. * `passed` - Run has successfully passed all configured policies. * `unreachable` - The policy check will not run. enum: - pending - queued - passed - errored - hard_failed - soft_failed - overridden - unreachable - canceled type: string status-timestamps: additionalProperties: format: date-time type: string description: Date/Time of transition to each status that has occurred. type: object type: object id: readOnly: true type: string links: properties: output: description: Link to download the policy check raw output. type: string readOnly: true type: object type: enum: - policy-checks type: string required: - type type: object PolicyCheckDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/PolicyCheck' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object PolicyCheckListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/PolicyCheck' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object PolicyDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/Policy' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object PolicyGroup: description: |- A policy group represents the collection of [OPA](../../opa.html) policies stored in a VCS repository. When [linked to an environment](environments.html#update-environment), the policy group will participate in the policy check phase of every run in that environment. properties: attributes: properties: created-at: description: Date/Time the policy group was created. format: date-time readOnly: true type: string error-message: description: This field contains the error description when the group's status is `errored`. nullable: true readOnly: true type: string is-enforced: default: false description: Indicates whether the policy group is enforced in all environments. type: boolean name: description: The policy group name must be unique within the account and contain only letters, numbers, dashes maxLength: 100 type: string opa-version: description: |- The version of Open Policy Agent to use for the policy evaluation. If omitted, the system default version is assigned. type: string status: description: |- Policy group current status. * `fetching` - waiting for policies to be synchronized with VCS. * `active` - synchronization completed, policy group is ready. * `errored` - synchronization has failed. Attribute `error-message` contains the details. enum: - fetching - active - errored readOnly: true type: string vcs-repo: properties: branch: description: |- Branch of a repository the policy group is associated with. If omitted, the repository default branch will be used. nullable: true type: string identifier: description: |- A reference to your VCS repository. For GitHub, GitHub Enterprise and GitLab the format is `/`. For Azure DevOps Services the format is `//`. type: string path: default: '' description: |- The sub-directory of the VCS repository where OPA policies are stored. The `scalr-policy.hcl` file must exist in this directory. Files and directories outside this directory will be ignored during a sync from VCS, and changing them won't trigger a policy group update. If omitted or submitted as an empty string, this defaults to the repository's root. nullable: true type: string required: - identifier type: object required: - name - vcs-repo type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: account: description: The account this policy group belongs to. properties: data: properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object environments: description: List of environments this policy group is linked to. properties: data: items: properties: id: type: string type: enum: - environments type: string required: - type - id type: object nullable: true type: array readOnly: true required: - data type: object policies: description: List of OPA policies this group contains. properties: data: items: properties: id: type: string type: enum: - policies type: string required: - type - id type: object nullable: true type: array readOnly: true required: - data type: object vcs-provider: description: The policy group's VCS provider. properties: data: properties: id: type: string type: enum: - vcs-providers type: string required: - type - id type: object required: - data type: object vcs-revision: description: The Git commit information when the policy group was fetched from VCS. properties: data: nullable: true properties: id: type: string type: enum: - vcs-revisions type: string required: - type - id type: object readOnly: true required: - data type: object required: - vcs-provider - account type: object type: enum: - policy-groups type: string required: - type - attributes - relationships type: object PolicyGroupDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/PolicyGroup' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object PolicyGroupEnvironmentRelationship: properties: id: type: string type: enum: - environments type: string required: - id - type type: object PolicyGroupEnvironmentRelationshipFieldsetsListingDocument: description: Document Listing. properties: data: items: $ref: '#/components/schemas/PolicyGroupEnvironmentRelationship' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object PolicyGroupListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/PolicyGroup' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object ProviderConfiguration: description: The configuration of provider. Provider configuration is managed on the account scope and can be linked to environments or workspaces. properties: attributes: properties: aws-access-key: description: AWS access key. This option is required with the `access_keys` credential type. nullable: true type: string aws-account-type: description: 'The type of AWS account, available options: `regular`, `gov-cloud`, `cn-cloud`.' enum: - regular - gov-cloud - cn-cloud nullable: true type: string aws-audience: description: The value of the aud claim for the identity token. minLength: 1 nullable: true type: string aws-credentials-type: description: 'The type of AWS credential, available options: `access_keys`, `role_delegation`, `oidc`.' enum: - role_delegation - access_keys - oidc nullable: true type: string aws-external-id: description: External identifier to use when assuming the role. This option is required with the `role_delegation` credential type. minLength: 2 nullable: true type: string aws-role-arn: description: Amazon Resource Name (ARN) of the IAM Role to assume. This option is required with the `role_delegation` and `oidc` credential type. minLength: 20 nullable: true type: string aws-secret-key: description: AWS secret key. This option is required with the `access_keys` credential type. format: password nullable: true type: string aws-trusted-entity-type: description: 'Trusted entity type, available options: `aws_account`, `aws_service`. This option is required with the `role_delegation` credential type.' enum: - aws_account - aws_service nullable: true type: string azurerm-audience: description: The value of the aud claim for the identity token. maxLength: 600 nullable: true type: string azurerm-auth-type: description: 'The type of azurerm credentials, available options: `client-secrets`, `oidc`.' enum: - client-secrets - oidc nullable: true type: string azurerm-client-id: description: The Client ID which should be used. nullable: true type: string azurerm-client-secret: description: The Client Secret which should be used. format: password nullable: true type: string azurerm-subscription-id: description: The Subscription ID which should be used. nullable: true type: string azurerm-tenant-id: description: The Tenant ID should be used. nullable: true type: string error-message: description: Contains the error message if the provider configuration is in an `errored` status. nullable: true readOnly: true type: string export-shell-variables: default: false description: Export provider variables into the run environment. This option is available only for built in providers. type: boolean google-auth-type: description: Authentication type to access GCP. enum: - service-account-key - oidc nullable: true type: string google-credentials: description: Service account key file in JSON format. format: password nullable: true type: string google-project: description: The default project to manage resources in. If another project is specified on a resource, it will take precedence. nullable: true type: string google-service-account-email: description: The service account email Scalr will use when authenticating to GCP. nullable: true type: string google-service-account-name: description: Service account name. nullable: true readOnly: true type: string google-use-default-project: default: true description: If the project will be enforced. nullable: true type: boolean google-workload-provider-name: description: The canonical name of the workload identity provider. nullable: true type: string is-custom: description: 'Determines if a provider configuration is custom. Note: custom provider configurations do not support built-in features like exporting as shell variables or on-save validation. Provider configuration will be validated during the run only.' nullable: true type: boolean is-shared: description: Indicates whether the provider configuration can be used in any workspace of the account without directly linking it to the environment. type: boolean name: description: The name of a Scalr provider configuration. This field is unique for the account. maxLength: 255 type: string provider-name: anyOf: - $ref: '#/components/schemas/BuiltInProviderTypes' - type: string description: The name of a Terraform provider. scalr-hostname: description: The Scalr hostname which should be used. nullable: true type: string scalr-token: description: The Scalr token which should be used. format: password nullable: true type: string status: description: 'Provider configuration status. Can be: `active`, `errored`.' enum: - active - errored readOnly: true type: string required: - name - provider-name type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: account: description: The account this provider configuration belongs to. properties: data: properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object environments: description: The list of environments attached to the provider configuration. Can be used to bulk link/unlink environments. properties: data: items: properties: id: type: string type: enum: - environments type: string required: - type - id type: object nullable: true type: array required: - data type: object parameters: description: The list of arguments for provider configurations. properties: data: items: properties: id: type: string type: enum: - provider-configuration-parameters type: string required: - type - id type: object nullable: true type: array readOnly: true required: - data type: object required: - account type: object type: enum: - provider-configurations type: string required: - type - attributes - relationships type: object ProviderConfigurationDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/ProviderConfiguration' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object ProviderConfigurationLink: description: The provider configuration link attaches the provider configuration to an environment or workspace. properties: attributes: properties: alias: description: Is used only for the workspace links. Meta-argument for using the same provider with different configurations for different resources. maxLength: 255 nullable: true type: string default: default: false description: Is used only for the environment links. Indicates whether the provider configuration must be used in every environment workspace during runs without direct linking. This behaviour can be changed in specific workspace by creating direct workspace link without alias. readOnly: true type: boolean type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: environment: properties: data: nullable: true properties: id: type: string type: enum: - environments type: string required: - type - id type: object readOnly: true required: - data type: object provider-configuration: properties: data: properties: id: type: string type: enum: - provider-configurations type: string required: - type - id type: object required: - data type: object workspace: properties: data: nullable: true properties: id: type: string type: enum: - workspaces type: string required: - type - id type: object readOnly: true required: - data type: object required: - provider-configuration type: object type: enum: - provider-configuration-links type: string required: - type - relationships type: object ProviderConfigurationLinkDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/ProviderConfigurationLink' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object ProviderConfigurationLinkListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/ProviderConfigurationLink' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object ProviderConfigurationListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/ProviderConfiguration' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object ProviderConfigurationParameter: description: The argument of the provider configuration. properties: attributes: properties: description: description: Variable description. maxLength: 512 nullable: true type: string key: description: Parameter name. maxLength: 128 type: string sensitive: default: false description: Indicates whether the value is sensitive. When set to `true` then the parameter is not visible after being written. type: boolean value: default: '' description: 'Parameter value. Not visible if sensitive: true is enabled' nullable: true type: string required: - key type: object id: readOnly: true type: string links: additionalProperties: type: string type: object relationships: properties: provider-configuration: properties: data: nullable: true properties: id: type: string type: enum: - provider-configurations type: string required: - type - id type: object readOnly: true required: - data type: object type: object type: enum: - provider-configuration-parameters type: string required: - type - attributes type: object ProviderConfigurationParameterDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/ProviderConfigurationParameter' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object ProviderConfigurationParameterListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/ProviderConfigurationParameter' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object Reason: properties: reason: default: '' description: The reason for locking the workspace. type: string type: object RegistryInputOptional: properties: default: anyOf: - type: boolean - type: integer - type: number - type: string - items: {} type: array - type: object nullable: true description: nullable: true type: string name: type: string sensitive: default: false type: boolean type: nullable: true type: string required: - default - name type: object RegistryInputRequired: properties: description: nullable: true type: string name: type: string sensitive: default: false type: boolean type: nullable: true type: string required: - name type: object RemoteStateConsumerRelationship: description: Represents remote state consumers' relationship. properties: id: type: string type: enum: - workspaces type: string required: - type - id type: object RemoteStateConsumerRelationshipFieldsetsListingDocument: description: Document Listing. properties: data: items: $ref: '#/components/schemas/RemoteStateConsumerRelationship' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object Role: description: A collection of permissions that can be assigned to a user, team, or service account via an [access policy](access-policies.html). properties: attributes: properties: description: description: The description of the role. maxLength: 255 nullable: true type: string is-system: description: When `true` the role is built-in, and cannot be modified or deleted. readOnly: true type: boolean name: description: The name of the role. maxLength: 128 type: string required: - name type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: account: description: The account this role belongs to. properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object permissions: description: The collection of [permissions](permissions.html) properties: data: items: properties: id: type: string type: enum: - permissions type: string required: - type - id type: object nullable: true type: array required: - data type: object type: object type: enum: - roles type: string required: - type - attributes type: object RoleDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/Role' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object RoleListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/Role' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object Run: description: |- A Run provides details of an entire run operation potentially comprising `plan`, `cost-estimation`, `policy-check` and `apply`. properties: attributes: properties: apply-at: description: The UTC datetime at which the Apply should be queued. format: date-time nullable: true readOnly: true type: string auto-apply: description: |- Indicates whether `terraform apply` should automatically run when terraform plan ends without error. Defaults to the current Auto Apply setting in the workspace. type: boolean created-at: description: The resource creation timestamp. format: date-time readOnly: true type: string error-message: description: Contains error message, when the run has finished in `errored` status. nullable: true readOnly: true type: string has-changes: description: Specifies whether the plan has proposed resource changes. readOnly: true type: boolean iac-platform: default: terraform description: The IaC platform for the run. enum: - terraform - opentofu readOnly: true type: string inputs: description: Terraform input variables that were passed into the workspace. items: properties: description: type: string name: type: string sensitive: type: boolean value: anyOf: - type: boolean - type: integer - type: number - type: string - items: {} type: array - type: object nullable: true type: object nullable: true type: array is-destroy: description: |- Indicates if this run is a destroy that will destroy all provisioned infrastructure in the current state. type: boolean is-dry: type: boolean message: description: Specifies the explanation message to associate with the run. maxLength: 512 nullable: true type: string permissions: readOnly: true type: object plan-at: description: The UTC datetime at which the Plan should be queued. format: date-time nullable: true type: string position-in-queue: nullable: true readOnly: true type: integer refresh: description: Specifies whether or not to refresh the state before a plan. nullable: true type: boolean refresh-only: description: Specifies whether this run should use the refresh-only plan mode. nullable: true type: boolean replace-addrs: description: Specifies an optional list of resource addresses to force replacement of a particular resource. If the plan would've normally produced an update or no-op action for this instance, Terraform will plan to replace it instead. items: maxLength: 262143 type: string nullable: true type: array source: anyOf: - $ref: '#/components/schemas/Sources' - type: string description: The origin of the run. status: description: |- The Run's current status. Initial status: * `pending` - The initial status of a run once it has been created. Scalr processes each workspace's runs in the order they were queued, and a run remains pending until every run before it has completed. The exception are Runs having `is-dry: true`. Such runs don't modify a workspace's state, and could run in a parallel until the account's runs quota limit. Plan stage: * `plan_queued` - The plan is queued and waiting for capacity/and or quota to be available. * `planning` - Scalr is currently running `terraform plan`. * `planned` - `terraform plan` has finished. If the run's workspace has `auto-apply: false`, Scalr pauses the run in this state, awaiting confirmation. * `confirmed` - Run has been confirmed to apply. Cost estimate stage (optional): * `cost_estimating` - Scalr is currently calculating the cost estimate for the plan. * `cost_estimated` - The cost estimation stage has finished. Policy check stage (optional): * `policy_checking` - Scalr is currently checking the plan against the environment's policies. * `policy_checked` - The policy check succeeded, and Policy Engine will allow an apply to proceed. Scalr sometimes pauses in this state, depending on workspace settings. * `policy_override` - The policy check finished, but at least one `soft-mandatory` policy failed, so an apply cannot proceed without approval from a user having `policy-checks:override` permission. The run pauses in this state. Apply stage: * `apply_queued` - The apply is queued and waiting for capacity/and or quota to be available. * `applying` - Scalr is currently running `terraform apply`. * `applied` - Scalr has successfully finished applying. Ending statuses: * `planned_and_finished` - Dry run's pipeline of Plan -> CostEstimate -> PolicyCheck stages have finished. This is the final state for dry run. * `errored` - The run has finished with an error. The attribute `error-message` has the details. * `discarded` - A user chose not to continue this run from a confirmation state * `canceled` - A user interrupted the run from any active stage. enum: - pending - plan_queued - planning - planned - planned_and_finished - confirmed - cost_estimating - cost_estimated - policy_checking - policy_override - policy_checked - apply_queued - applying - applied - errored - discarded - canceled readOnly: true type: string status-timestamps: additionalProperties: format: date-time type: string description: Timestamps of transition to prior and current statuses. readOnly: true type: object target-addrs: description: If non-empty, requests that Terraform should create a plan including actions only for the given objects (specified using resource address syntax) and the objects they depend on. items: maxLength: 262143 type: string nullable: true type: array type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: apply: description: Terraform apply phase. properties: data: nullable: true properties: id: type: string type: enum: - applies type: string required: - type - id type: object readOnly: true required: - data type: object configuration-version: description: The Run's configuration version. properties: data: nullable: true properties: id: type: string type: enum: - configuration-versions type: string required: - type - id type: object required: - data type: object cost-estimate: description: Cost estimation phase. properties: data: nullable: true properties: id: type: string type: enum: - cost-estimates type: string required: - type - id type: object readOnly: true required: - data type: object created-by: description: User that has triggered the run. properties: data: nullable: true properties: id: type: string type: enum: - users type: string required: - type - id type: object readOnly: true required: - data type: object created-by-run: description: Upstream Run that has triggered this run. properties: data: nullable: true properties: id: type: string type: enum: - runs type: string required: - type - id type: object readOnly: true required: - data type: object environment: description: The environment this run Run belongs to. properties: data: nullable: true properties: id: type: string type: enum: - environments type: string required: - type - id type: object readOnly: true required: - data type: object plan: description: Terraform plan phase. properties: data: nullable: true properties: id: type: string type: enum: - plans type: string required: - type - id type: object readOnly: true required: - data type: object policy-checks: description: Policy check phase. properties: data: items: properties: id: type: string type: enum: - policy-checks type: string required: - type - id type: object nullable: true type: array readOnly: true required: - data type: object state-versions: description: The run's state versions. properties: data: items: properties: id: type: string type: enum: - state-versions type: string required: - type - id type: object nullable: true type: array readOnly: true required: - data type: object status-transitions: description: Date/Time of transition to each status that has occurred. properties: data: items: properties: id: type: string type: enum: - status-transitions type: string required: - type - id type: object nullable: true type: array readOnly: true required: - data type: object tags: properties: data: items: properties: id: type: string type: enum: - tags type: string required: - type - id type: object nullable: true type: array readOnly: true required: - data type: object vcs-revision: description: Relation to the Git commit information, when the run's `configuration-version` source is `vcs` properties: data: nullable: true properties: id: type: string type: enum: - vcs-revisions type: string required: - type - id type: object readOnly: true required: - data type: object workspace: description: The workspace this Run belongs to. properties: data: nullable: true properties: id: type: string type: enum: - workspaces type: string required: - type - id type: object required: - data type: object type: object type: enum: - runs type: string required: - type type: object RunDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/Run' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object RunListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/Run' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object RunTrigger: description: |- Run triggers allow runs to queue automatically in downstream workspace on successful apply of runs in any of the upstream workspaces. properties: attributes: properties: created-at: description: The resource creation timestamp. format: date-time readOnly: true type: string type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: downstream: description: Downstream workspace in which new runs will be created. properties: data: properties: id: type: string type: enum: - workspaces type: string required: - type - id type: object required: - data type: object upstream: description: Upstream workspace to track new runs. properties: data: properties: id: type: string type: enum: - workspaces type: string required: - type - id type: object required: - data type: object required: - upstream - downstream type: object type: enum: - run-triggers type: string required: - type - relationships type: object RunTriggerDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/RunTrigger' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object ServiceAccount: description: |- Represents a service account definition. A service account is a special type of account intended to represent a non-human user that needs to authenticate and be authorized to access data in Scalr APIs. properties: attributes: properties: created-at: format: date-time readOnly: true type: string description: description: The service account description. maxLength: 255 nullable: true type: string email: description: A read-only field which is generated when a service account is created. Consists of `@.scalr.io` readOnly: true type: string name: description: The service account name. The service account email will be created using this name. type: string status: description: 'The service account status. Can be: `Active`, `Inactive`.' enum: - Active - Inactive type: string type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: account: description: The account ID, the service account belongs to. properties: data: properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object created-by: description: The user who created the service account. properties: data: nullable: true properties: id: type: string type: enum: - users type: string required: - type - id type: object readOnly: true required: - data type: object owners: description: The teams, the service account belongs to. properties: data: items: properties: id: type: string type: enum: - teams type: string required: - type - id type: object nullable: true type: array required: - data type: object required: - account type: object type: enum: - service-accounts type: string required: - type - relationships type: object ServiceAccountDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/ServiceAccount' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object ServiceAccountListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/ServiceAccount' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object SlackChannel: properties: id: type: string is-private: type: boolean name: type: string required: - id - is-private - name type: object SlackChannelFieldsetsListingDocument: description: Document Listing. properties: data: items: $ref: '#/components/schemas/SlackChannel' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object SlackConnection: properties: attributes: properties: slack-workspace-name: description: The name of connected Slack workspace. maxLength: 255 type: string type: object id: readOnly: true type: string links: additionalProperties: type: string type: object relationships: properties: account: description: The account this connection belongs to. properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object type: object type: enum: - slack-connections type: string required: - type type: object SlackConnectionDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/SlackConnection' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object SlackIntegration: properties: attributes: properties: channel-id: description: A Slack channel ID to which to send messages. maxLength: 24 type: string err-message: description: Message from service that points to nature of a problem nullable: true readOnly: true type: string events: description: Events for which to get notifications. items: enum: - run_approval_required - run_success - run_errored type: string type: array name: description: Name of Slack integration maxLength: 128 type: string run-mode: default: all description: What type of runs should be reported. enum: - all - apply - dry type: string status: description: Status of integration. enum: - active - disabled - failed type: string required: - name - channel-id type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: account: description: The account this integration belongs to. properties: data: properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object connection: description: Associated Slack App connection. properties: data: properties: id: type: string type: enum: - slack-connections type: string required: - type - id type: object required: - data type: object environments: description: Environments source of events. properties: data: items: properties: id: type: string type: enum: - environments type: string required: - type - id type: object type: array required: - data type: object workspaces: description: Workspaces source of events. properties: data: items: properties: id: type: string type: enum: - workspaces type: string required: - type - id type: object nullable: true type: array required: - data type: object required: - account - connection - environments type: object type: enum: - slack-integrations type: string required: - type - attributes - relationships type: object SlackIntegrationDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/SlackIntegration' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object SlackIntegrationListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/SlackIntegration' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object SoftwareVersion: description: Represents a software version. properties: attributes: properties: created-at: description: The resource creation timestamp. format: date-time readOnly: true type: string default: default: false description: |- Default version to use when workspace or policy-group creation request doesn't specify a version. readOnly: true type: boolean deprecated: default: false description: |- Indicates that this software-version is deprecated, and thus not available for new workspaces or policy-groups. type: boolean error: description: |- This field contains the error description, when this software-version's status is `failed`. nullable: true readOnly: true type: string hash: description: Container image SHA256 hash. nullable: true readOnly: true type: string image: description: |- Reference to a container image in OCI registry. Only public registries supported ATM. maxLength: 255 type: string latest: default: false description: |- Indicates that this software-version is the latest one for the given software-type. readOnly: true type: boolean software-type: description: The type of the software. enum: - opa - terraform - infracost - opentofu type: string status: description: |- The software version status. * `pending` - Image is not pulled yet. * `failed` - Image pull ended with a failure. Attribute `error` contains the details. * `active` - Available to use. enum: - pending - failed - active readOnly: true type: string version: description: Semantic Version. maxLength: 255 type: string required: - version - software-type - image type: object id: readOnly: true type: string links: additionalProperties: type: string type: object type: enum: - software-versions type: string required: - type - attributes type: object SoftwareVersionDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/SoftwareVersion' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object SoftwareVersionListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/SoftwareVersion' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object Sources: enum: - api - cli - scalr-cli - configuration-version - service-catalog - ui - vcs - vcs-task - run-trigger - schedule - restart - restart-ci - assistant - dashboard-run - dashboard-workspace - workspaces-environment - workspaces-environment-bulk - workspaces-account - workspaces-account-bulk type: string StateVersion: description: A State version is the version of a state file associated with a workspace. properties: attributes: properties: created-at: description: The resource creation timestamp. format: date-time readOnly: true type: string force: type: boolean lineage: description: Lineage of the state version. Should match the lineage extracted from the `terraform.tfstate`. maxLength: 255 nullable: true type: string md5: description: The MD5 hash of the terraform.tfstate. maxLength: 32 type: string modules: additionalProperties: additionalProperties: type: integer type: object description: The list of modules. readOnly: true type: object outputs: description: The list of output values. items: properties: name: default: '' type: string sensitive: default: false type: boolean value: anyOf: - type: string - type: object - items: {} type: array default: '' nullable: true type: object nullable: true readOnly: true type: array providers: additionalProperties: additionalProperties: type: integer type: object description: The list of providers. readOnly: true type: object resources: description: The list of resources. items: properties: address: default: '' type: string module: default: '' nullable: true type: string type: default: '' type: string type: object readOnly: true type: array serial: description: The serial of the state version which must match the `serial` value from the `terraform.tfstate`. type: integer size: description: Size of the `terraform.tfstate` in bytes. readOnly: true type: integer state: description: Base64 encoded `terraform.tfstate` nullable: true type: string type: object id: readOnly: true type: string links: properties: download: description: The URL to download the `terraform.tfstate`. nullable: true readOnly: true type: string self: readOnly: true type: string readOnly: true type: object relationships: properties: next-state-version: description: Next state version for the workspace to which state version is associated. properties: data: nullable: true properties: id: type: string type: enum: - state-versions type: string required: - type - id type: object readOnly: true required: - data type: object previous-state-version: description: Previous state version for the workspace to which state version is associated. properties: data: nullable: true properties: id: type: string type: enum: - state-versions type: string required: - type - id type: object readOnly: true required: - data type: object run: description: The the optional run associated with the state version. properties: data: nullable: true properties: id: type: string type: enum: - runs type: string required: - type - id type: object required: - data type: object workspace: description: The workspace, this state version belongs to. properties: data: nullable: true properties: id: type: string type: enum: - workspaces type: string required: - type - id type: object required: - data type: object type: object type: enum: - state-versions type: string required: - type type: object StateVersionDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/StateVersion' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object StateVersionListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/StateVersion' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object StatusTransition: description: Status transition of entity. properties: attributes: properties: occurred-at: format: date-time type: string reason: nullable: true type: string status: type: string required: - status - occurred-at type: object id: readOnly: true type: string links: additionalProperties: type: string type: object relationships: properties: user: properties: data: nullable: true properties: id: type: string type: enum: - users type: string required: - type - id type: object required: - data type: object type: object type: enum: - status-transitions type: string required: - type - attributes type: object StatusTransitionDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/StatusTransition' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object Tag: description: |- Tag is a keyword or term associated with a Scalr resource. It is used to label resources across the account to help to identify them, improve searchability or can even participate in a terraform run e.g. as a part of metadata for policy decision. Tags are unique within the account. Deleted tags will be removed from associated resources. properties: attributes: properties: name: description: The name of the tag. It must be unique within the account. maxLength: 255 type: string required: - name type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: account: description: The account this tag belongs to. properties: data: properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object required: - account type: object type: enum: - tags type: string required: - type - attributes - relationships type: object TagDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/Tag' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object TagListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/Tag' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object TagRelationship: description: Represents tags' relationship. properties: id: type: string type: enum: - tags type: string required: - type - id type: object TagRelationshipFieldsetsListingDocument: description: Document Listing. properties: data: items: $ref: '#/components/schemas/TagRelationship' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object Team: description: |- A [IAM](https://docs.scalr.io/docs/identity-and-access-management) team is used to organize users into logical units. A team can not be used to group service accounts, only standard users. properties: attributes: properties: description: description: The verbose description of the team. maxLength: 255 nullable: true type: string name: description: The name of the team. maxLength: 255 type: string required: - name type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: account: description: The account this team belongs to. properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object readOnly: true required: - data type: object identity-provider: description: Identity provider of the team. Can be internal (Scalr) or external (LDAP/SAML) properties: data: nullable: true properties: id: type: string type: enum: - identity-providers type: string required: - type - id type: object readOnly: true required: - data type: object users: description: The list of users in the team. properties: data: items: properties: id: type: string type: enum: - users type: string required: - type - id type: object nullable: true type: array required: - data type: object type: object type: enum: - teams type: string required: - type - attributes type: object TeamDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/Team' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object TeamListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/Team' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object TerraformModuleUsage: description: Represents terraform module usage instance. properties: attributes: properties: module: type: string parent-module: nullable: true type: string source: maxLength: 255 nullable: true type: string versions-used-count: description: Number of module versions. type: integer workspaces-count: description: Number of module workspaces. type: integer required: - module - versions-used-count - workspaces-count type: object id: readOnly: true type: string links: additionalProperties: type: string type: object relationships: properties: namespace: description: The namespace this usage instance belongs to. properties: data: nullable: true properties: id: type: string type: enum: - tf-module-namespaces type: string required: - type - id type: object required: - data type: object type: object type: enum: - tf-module-usages type: string required: - type - attributes type: object TerraformModuleUsageDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/TerraformModuleUsage' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object TerraformModuleUsageListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/TerraformModuleUsage' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object TerraformModuleUsageSource: description: Represents terraform module source properties: source: type: string required: - source type: object TerraformModuleUsageSourceFieldsetsListingDocument: description: Document Listing. properties: data: items: $ref: '#/components/schemas/TerraformModuleUsageSource' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object TerraformModuleUsageVersion: description: Represents terraform module version properties: version: type: string type: object TerraformModuleUsageVersionFieldsetsListingDocument: description: Document Listing. properties: data: items: $ref: '#/components/schemas/TerraformModuleUsageVersion' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object TerraformModuleVersionUsage: description: Represents terraform module version usage instance. properties: attributes: properties: created-at: format: date-time type: string version: maxLength: 64 nullable: true type: string required: - created-at type: object id: readOnly: true type: string links: additionalProperties: type: string type: object relationships: properties: environment: description: The environment this usage instance belongs to. properties: data: nullable: true properties: id: type: string type: enum: - environments type: string required: - type - id type: object required: - data type: object workspace: description: The workspace this usage instance belongs to. properties: data: nullable: true properties: id: type: string type: enum: - workspaces type: string required: - type - id type: object required: - data type: object type: object type: enum: - tf-module-version-usages type: string required: - type - attributes type: object TerraformModuleVersionUsageListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/TerraformModuleVersionUsage' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object TerraformProviderUsage: description: Represents terraform provider usage instance. properties: attributes: properties: provider: type: string source: maxLength: 255 type: string versions-used-count: type: integer workspaces-count: type: integer required: - provider - source - versions-used-count - workspaces-count type: object id: readOnly: true type: string links: additionalProperties: type: string type: object type: enum: - tf-provider-usages type: string required: - type - attributes type: object TerraformProviderUsageDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/TerraformProviderUsage' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object TerraformProviderUsageListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/TerraformProviderUsage' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object TerraformProviderUsageSource: description: Represents terraform provider source properties: source: type: string required: - source type: object TerraformProviderUsageSourceFieldsetsListingDocument: description: Document Listing. properties: data: items: $ref: '#/components/schemas/TerraformProviderUsageSource' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object TerraformProviderUsageVersion: description: Represents terraform provider version properties: version: type: string required: - version type: object TerraformProviderUsageVersionFieldsetsListingDocument: description: Document Listing. properties: data: items: $ref: '#/components/schemas/TerraformProviderUsageVersion' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object TerraformProviderVersionUsage: description: Represents terraform provider version usage. properties: attributes: properties: created-at: format: date-time type: string version: maxLength: 64 nullable: true type: string required: - version - created-at type: object id: readOnly: true type: string links: additionalProperties: type: string type: object relationships: properties: environment: description: The environment this usage instance belongs to. properties: data: nullable: true properties: id: type: string type: enum: - environments type: string required: - type - id type: object required: - data type: object workspace: description: The workspace this usage belongs to. properties: data: nullable: true properties: id: type: string type: enum: - workspaces type: string required: - type - id type: object required: - data type: object type: object type: enum: - tf-provider-version-usages type: string required: - type - attributes type: object TerraformProviderVersionUsageListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/TerraformProviderVersionUsage' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object TerraformResourceInstanceUsage: description: Represents terraform resource instance usage properties: attributes: properties: address: description: Resource instance address. Combines module, name and index of the resource. maxLength: 255 type: string external-id: description: External ID of the resource instance. maxLength: 1024 type: string is-active: default: true description: Indicates if the resource instance is active. type: boolean is-duplicate: default: false description: Indicates if the resource is a duplicate type: boolean name: description: Resource instance name. maxLength: 255 type: string updated-at: description: Time when the resource instance was created or updated. format: date-time type: string updated-by-email: description: The email of the user who create or update this resource instance. maxLength: 100 type: string workspace-name: description: Name of the workspace this resource instance belongs to. maxLength: 255 type: string required: - name - external-id - address - workspace-name - updated-at - updated-by-email type: object id: readOnly: true type: string links: additionalProperties: type: string type: object relationships: properties: environment: description: The environment this resource instance belongs to. properties: data: nullable: true properties: id: type: string type: enum: - environments type: string required: - type - id type: object required: - data type: object resource: description: The resource this instance belongs to. properties: data: nullable: true properties: id: type: string type: enum: - tf-resource-usages type: string required: - type - id type: object required: - data type: object run: description: The run which created or updated this resource instance. properties: data: nullable: true properties: id: type: string type: enum: - runs type: string required: - type - id type: object required: - data type: object state-version: description: The state version this resource instance belongs to. properties: data: nullable: true properties: id: type: string type: enum: - state-versions type: string required: - type - id type: object required: - data type: object workspace: description: The workspace this resource instance belongs to. properties: data: nullable: true properties: id: type: string type: enum: - workspaces type: string required: - type - id type: object required: - data type: object type: object type: enum: - tf-resource-instance-usages type: string required: - type - attributes type: object TerraformResourceInstanceUsageListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/TerraformResourceInstanceUsage' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object TerraformResourceUsage: description: Represents terraform resource usage instance properties: attributes: properties: active-instances-count: description: The total number of resource instances which are present in the infrastructure. type: integer deleted-instances-count: description: The total number of resource instances which are deleted from the infrastructure. type: integer name: description: Resource name. maxLength: 255 type: string provider-type: description: Terraform provider by which resource is managed. maxLength: 64 type: string workspaces-count: description: The total number of workspaces where this resource is used. type: integer required: - name - provider-type - active-instances-count - deleted-instances-count - workspaces-count type: object id: readOnly: true type: string links: additionalProperties: type: string type: object relationships: properties: account: description: The account this resource belongs to. properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object type: object type: enum: - tf-resource-usages type: string required: - type - attributes type: object TerraformResourceUsageDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/TerraformResourceUsage' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object TerraformResourceUsageListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/TerraformResourceUsage' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object TerraformResourceUsageProviderType: description: Represents terraform resource provider type properties: provider-type: description: Terraform provider type. type: string required: - provider-type type: object TerraformResourceUsageProviderTypeFieldsetsListingDocument: description: Document Listing. properties: data: items: $ref: '#/components/schemas/TerraformResourceUsageProviderType' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object TerraformVersionUsage: description: Represents terraform version usage instance. properties: attributes: properties: created-at: format: date-time type: string version: maxLength: 64 type: string required: - version - created-at type: object id: readOnly: true type: string links: additionalProperties: type: string type: object relationships: properties: account: description: The environment this usage instance belongs to. properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object environment: description: The environment this usage instance belongs to. properties: data: nullable: true properties: id: type: string type: enum: - environments type: string required: - type - id type: object required: - data type: object workspace: description: The workspace this usage instance belongs to. properties: data: nullable: true properties: id: type: string type: enum: - workspaces type: string required: - type - id type: object required: - data type: object type: object type: enum: - tf-version-usages type: string required: - type - attributes type: object TerraformVersionUsageListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/TerraformVersionUsage' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object TerraformVersionUsageVersion: description: Represents terraform version properties: version: type: string required: - version type: object TerraformVersionUsageVersionFieldsetsListingDocument: description: Document Listing. properties: data: items: $ref: '#/components/schemas/TerraformVersionUsageVersion' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object UsageStatistic: properties: attributes: properties: breakdown-id: description: The identifier of a resource by which the usage is broken down nullable: true type: string breakdown-name: description: The name of a resource by which the usage is broken down nullable: true type: string date: description: The date when usage has been recorded format: date type: string runs-count: default: 0 description: The count of runs finished within the date type: integer runs-seconds: default: 0 description: The duration of runs in seconds within the date type: integer type: object id: readOnly: true type: string links: additionalProperties: type: string type: object relationships: properties: account: description: The account id usage is reported for properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object type: object type: enum: - usage-statistics type: string required: - type type: object UsageStatisticListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/UsageStatistic' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object User: description: Represents a Scalr [IAM](https://docs.scalr.io/docs/identity-and-access-management) user. properties: attributes: properties: created-at: format: date-time nullable: true type: string email: maxLength: 255 type: string full-name: maxLength: 100 nullable: true type: string last-login-at: format: date-time nullable: true type: string status: enum: - Active - Inactive - Pending type: string username: maxLength: 255 type: string required: - email type: object id: readOnly: true type: string links: properties: self: type: string readOnly: true type: object relationships: properties: identity-providers: properties: data: items: properties: id: type: string type: enum: - identity-providers type: string required: - type - id type: object nullable: true type: array required: - data type: object teams: properties: data: items: properties: id: type: string type: enum: - teams type: string required: - type - id type: object nullable: true type: array required: - data type: object type: object type: enum: - users type: string required: - type - attributes type: object UserDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/User' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object UserInvite: description: Represents an create [IAM](https://docs.scalr.io/docs/identity-and-access-management) account user request. properties: attributes: properties: email: format: email type: string send-invite: default: true description: If set to `true`, email with invite to the account will be sent to the user email. type: boolean required: - email type: object id: readOnly: true type: string links: additionalProperties: type: string type: object relationships: properties: roles: description: Assign roles for this user on the account scope. properties: data: items: properties: id: type: string type: enum: - roles type: string required: - type - id type: object nullable: true type: array required: - data type: object teams: description: Add user to the teams. properties: data: items: properties: id: type: string type: enum: - teams type: string required: - type - id type: object nullable: true type: array required: - data type: object type: object type: enum: - users type: string required: - type - attributes type: object UserInviteDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/UserInvite' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object UserListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/User' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object Variable: description: |- A Variable describes the configuration and value of a variable in a workspace. In Scalr there are "terraform" and "environment" variables. * Terraform variables define values to be passed into the corresponding Terraform input variable that is defined in the Configuration Version to be used in a run. Scalr Terraform variables are added to the `terraform.tfvars.json` file in the working directory of the workspace prior to any run. The values passed in can be HCL structures if the `hcl` attribute is `true`. * Environment variables define shell variables that are added to the run time environment of a workspace using `export VAR=value`. These variables can pass authentication parameters to providers or any data required for local processing, such as via `local-exec` provisioners. properties: attributes: properties: category: description: |- * `terraform` - Values to be passed to terraform input variables of the same name. * `env` - shell environment variables. They will be injected via `export` during a terraform run. enum: - terraform - env - shell type: string description: description: Variable description. maxLength: 512 nullable: true type: string final: default: false description: Indicates whether the variable can be overridden on a lower down the Scalr organizational model. type: boolean hcl: default: false description: |- Indicates whether the value of the variable is a string of HCL code. Not applicable to `env` category variables. type: boolean key: description: |- Variable name. Must correspond to the name of a Terraform input variable in the configuration if category is terraform. maxLength: 128 type: string sensitive: default: false description: |- Indicates whether the value is sensitive. When set to `true` then the variable is not visible after being written. type: boolean value: default: '' description: 'Variable value. Not visible if sensitive: true is enabled' nullable: true type: string required: - category - key type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: account: description: The account this variable belongs to properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object readOnly: true required: - data type: object environment: description: The environment this variable belongs to properties: data: nullable: true properties: id: type: string type: enum: - environments type: string required: - type - id type: object required: - data type: object workspace: description: The workspace this variable belongs to. properties: data: nullable: true properties: id: type: string type: enum: - workspaces type: string required: - type - id type: object required: - data type: object type: object type: enum: - vars type: string required: - type - attributes type: object VariableDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/Variable' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object VariableListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/Variable' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object VcsProvider: description: |- The [VCS Provider](../../vcs_providers.html) resource represents a connection between a Scalr account and a VCS, such as GitHub, Gitlab, Bitbucket, and Azure DevOps. properties: attributes: properties: auth-type: description: |- Authentication type, the VCS API client is using to establish connection with the VCS. * `oauth2` - private OAuth App, user or organization creates in their VCS account. Setup through this method requires a user to complete a [web flow through a browser](../../vcs_providers.html#github), where the user should authorize Scalr to connect to their OAuth App. * `personal_token` - a pre-generated authentication token. This method works better if you need to fully automate the VCS provider creation. How to generate access tokens for different VCS providers: * [GitHub and GitHub Enterprise](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) * [GitLab and GitLab Enterprise](https://docs.gitlab.com/ce/user/profile/personal_access_tokens.html#creating-a-personal-access-token) * [Azure DevOps](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops-2019&tabs=preview-page) * [Bitbucket Data Center](https://confluence.atlassian.com/bitbucketserver/personal-access-tokens-939515499.html) enum: - oauth2 - personal_token type: string comments-enabled: default: false description: Indicates whether commenting on PRs is enabled for this VCS provider. type: boolean draft-pr-runs-enabled: default: false description: Indicates whether the draft pull-request runs are enabled for this VCS provider. type: boolean error-message: description: Contains error message, if the connection to VCS provider is broken. nullable: true readOnly: true type: string is-shared: description: Indicates whether the VCS provider can be used in any account environments or only linked one. type: boolean name: description: VCS provider name, which must be unique within the account. maxLength: 255 minLength: 1 pattern: ^[ A-Za-z0-9_-]+$ type: string token: description: Access token for an API client for using to connect to the VCS Provider. nullable: true type: string url: description: |- The URL to the VCS provider installation. Required for GitHub Enterprise, GitLab Enterprise and Bitbucket Data Center. format: uri maxLength: 255 minLength: 1 nullable: true type: string username: description: Username for personal_token auth type. This field is required for bitbucket_enterprise provider. maxLength: 255 nullable: true type: string vcs-type: description: VCS provider type. enum: - github - gitlab - bitbucket - bitbucket_enterprise - gitlab_enterprise - github_enterprise - azure_dev_ops_services type: string required: - name - vcs-type - auth-type type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: account: description: The account that owns this VCS integration. properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object agent-pool: description: The ID of the agent pool to communicate with on-prem VCS provider that not accessible directly. properties: data: nullable: true properties: id: type: string type: enum: - agent-pools type: string required: - type - id type: object required: - data type: object environments: description: The list of environments this VCS integration is linked to. properties: data: items: properties: id: type: string type: enum: - environments type: string required: - type - id type: object nullable: true type: array required: - data type: object type: object type: enum: - vcs-providers type: string required: - type - attributes type: object VcsProviderDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/VcsProvider' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object VcsProviderListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/VcsProvider' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object VcsRevision: description: Resource represents a VCS revision attributes. properties: attributes: properties: branch: maxLength: 255 nullable: true type: string clone-url: type: string commit-message: nullable: true type: string commit-sha: maxLength: 40 nullable: true type: string commit-url: nullable: true type: string repository-id: maxLength: 255 type: string sender-username: maxLength: 255 nullable: true type: string type: object id: readOnly: true type: string links: properties: self: type: string readOnly: true type: object type: enum: - vcs-revisions type: string required: - type type: object VcsRevisionDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/VcsRevision' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object VcsTaskRequest: description: Represents a request for creating a VCS task. properties: branch: maxLength: 255 minLength: 1 type: string commit-sha: maxLength: 40 minLength: 1 type: string repository-id: maxLength: 255 minLength: 1 type: string required: - repository-id - branch - commit-sha type: object Webhook: description: |- Webhooks provide a mechanism to integrate Scalr with external API's. Webhooks are triggered by [Events](event-definitions.html#list-event-definitions) which causes Scalr to send an HTTP POST payload to the [endpoint](endpoints.html) associated with the webhook. Webhooks can be used to trigger any action in any external system that has an API or programmable interface. The Endpoint will typically point to a server that processes the HTTP POST request and makes the onward calls to the external API. Webhooks can be created in [environments](environments.html) or in specific [workspaces](workspaces.html). ### Webhook Notification Example: ```http POST /services/58320402 HTTP/1.1 Host: hooks.example.com Content-Type: application/json Content-Length: 935 Date: 2020-11-25T00:43:38+0000 X-Scalr-Delivery-Id: wd-t6v0hrnn58vu4m0 X-Signature: 5782c2fa7c38ddc45efd8b7497ac1c9c91ae90fae2fa06148b69bba4c2e22869 { "payload_version": 1, "event_name": "run:needs_attention", "run": { "id": "run-t6v0g8prd9qi2h0", "message": "Update variables.tf", "status": "policy_checked", "source": "ui", "url": "https://my.scalr.io/#/workspaces/runs/dashboard?runId=run-t6v0g8prd9qi2h0", "created_at": "2020-11-25T00:42:15", "updated_at": "2020-11-25T00:43:38", "created_by": { "id": "user-stp8qjcvjljlo1o", "username": "me@example.com", "email": "me@example.com" } }, "webhook": { "id": "wh-t6v0g1l0dlqhh58", "name": "Data Platform" }, "workspace": { "id": "ws-t5hft7e7v366rd0", "name": "my-example", "url": "https://my.scalr.io/#/workspaces/dashboard?workspaceId=ws-t5hft7e7v366rd0" }, "environment": { "id": "env-sfuari395m7sck1", "name": "my-development", "url": "https://my.scalr.io/#/15986/17348/dashboard" }, "variables": { "foo": "bar" } } ``` ### Signature Verification Scalr adds a cryptographic signature to Webhook notifications in order for you to be able to validate that they were indeed generated by Scalr. To validate Webhook notification, follow this procedure: * Obtain the `secret_key` for your [Endpoint](endpoints.html). * When receiving a Webhook payload, compute its signature using the following algorithm (see below for code samples) * Concatenate the JSON payload and the `Date` header * Compute a `HMAC` digest of the concatenated message, using the `SHA-256` algorithm * Retrieve the hexadecimal value of the `HMAC` digest. This is the signature. * Compare the signature you computed to the one in the `X-Signature` HTTP Header. For maximum security, ensure you perform a constant-time comparison. * If the signatures match, the message is authentic, and was indeed sent by Scalr * If the signatures do not match, the message is a forgery, and was not sent by Scalr To compute a Webhook notification signature in Bash, use the following algorithm. We assume that the `$payload` variable contains the request JSON payload, that `$timestamp` contains the `Date` Header, and that `$secret_key` is your Endpoint's `secret-key`. ```bash canonical_string="${payload}${timestamp}" signature=$(echo -n $canonical_string | openssl dgst -sha256 -hmac $secret_key | awk '{ print $2}') ``` The extra fields below are not available in response by default. Ask for them explicitly in the query parameter `fields[webhooks]`: * statistics properties: attributes: properties: enabled: description: Webhook can be turned off by setting to `false`. type: boolean last-triggered-at: description: The Date/Time of the last notification. format: date-time readOnly: true type: string name: description: The name of the webhook. Use your target application/component name for better discoverability. maxLength: 255 type: string permissions: readOnly: true type: object statistics: description: 'Webhook delivery statistics (delivered, failed and total) by periods: last hour, last day and last week' properties: last-day: properties: delivered: default: 0 type: integer failed: default: 0 type: integer total: default: 0 type: integer type: object last-hour: properties: delivered: default: 0 type: integer failed: default: 0 type: integer total: default: 0 type: integer type: object last-week: properties: delivered: default: 0 type: integer failed: default: 0 type: integer total: default: 0 type: integer type: object readOnly: true type: object required: - name type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: account: description: The account this webhook belongs to. properties: data: nullable: true properties: id: type: string type: enum: - accounts type: string required: - type - id type: object readOnly: true required: - data type: object endpoint: description: The Endpoint this webhook is delivered to. properties: data: properties: id: type: string type: enum: - endpoints type: string required: - type - id type: object required: - data type: object environment: description: The environment this webhook belongs to. properties: data: nullable: true properties: id: type: string type: enum: - environments type: string required: - type - id type: object required: - data type: object events: description: |- The list of events this webhook will be notified about. Use [List Event Definitions](event-definitions.html#list-event-definitions) to obtain the list of all available events. properties: data: items: properties: id: type: string type: enum: - event-definitions type: string required: - type - id type: object nullable: true type: array readOnly: true required: - data type: object workspace: description: The optional workspace this webhook belongs to. properties: data: nullable: true properties: id: type: string type: enum: - workspaces type: string required: - type - id type: object required: - data type: object required: - endpoint type: object type: enum: - webhooks type: string required: - type - attributes - relationships type: object WebhookDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/Webhook' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object WebhookIntegration: description: |- Represents the webhook integration The extra fields below are not available in response by default. Ask for them explicitly in the query parameter `fields[webhook-integrations]`: * statistics properties: attributes: properties: enabled: description: Webhook can be turned off by setting to `false`. type: boolean headers: items: properties: name: description: A header name. type: string sensitive: default: false description: Whether the value is a sensitive. type: boolean value: description: A header value. Not visible if sensitive. nullable: true type: string required: - name - value type: object nullable: true type: array http-method: default: POST readOnly: true type: string is-shared: description: Indicates whether the webhook is available in any environment of the account without directly linking it. type: boolean last-triggered-at: description: The Date/Time of the last notification. format: date-time nullable: true readOnly: true type: string max-attempts: default: 3 description: The number of retry attempts. type: integer name: description: The name of the webhook. Use your target application/component name for better discoverability. maxLength: 255 type: string secret-key: description: The secret passphrase for HMAC signature. maxLength: 1024 type: string statistics: description: 'Webhook delivery statistics (delivered, failed and total) by periods: last hour, last day and last week' nullable: true properties: last-day: properties: delivered: default: 0 type: integer failed: default: 0 type: integer total: default: 0 type: integer type: object last-hour: properties: delivered: default: 0 type: integer failed: default: 0 type: integer total: default: 0 type: integer type: object last-week: properties: delivered: default: 0 type: integer failed: default: 0 type: integer total: default: 0 type: integer type: object readOnly: true type: object timeout: default: 15 description: The HTTP transaction timeout. type: integer url: description: HTTP(s) destination URL. maxLength: 2048 type: string required: - name - url type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: account: description: The account this webhook belongs to. properties: data: properties: id: type: string type: enum: - accounts type: string required: - type - id type: object required: - data type: object environments: description: The list of environments this webhook is linked to. properties: data: items: properties: id: type: string type: enum: - environments type: string required: - type - id type: object nullable: true type: array required: - data type: object events: description: |- The list of events this webhook will be notified about. Use [List Event Definitions](event-definitions.html#list-event-definitions) to obtain the list of all available events. properties: data: items: properties: id: type: string type: enum: - event-definitions type: string required: - type - id type: object nullable: true type: array required: - data type: object required: - account type: object type: enum: - webhook-integrations type: string required: - type - attributes - relationships type: object WebhookIntegrationDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/WebhookIntegration' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object WebhookIntegrationListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/WebhookIntegration' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object WebhookListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/Webhook' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object Workspace: description: |- A Workspace is where Terraform runs are performed for a specific configuration, and where the resulting state file(s) are stored. Workspaces belong to environments and can have `variables` configured to provide inputs to the configuration, authenticate providers etc. The extra fields below are not available in response by default. Ask for them explicitly in the query parameter `fields[workspaces]`: * module properties: attributes: properties: apply-schedule: description: Cron expression for scheduled runs. Time should be in UTC. nullable: true readOnly: true type: string auto-apply: description: |- Indicates whether `terraform apply` should automatically run when terraform plan ends without error. Default `false`. type: boolean auto-queue-runs: default: skip_first description: |- Indicates if runs have to be queued automatically when a new configuration version is uploaded. `skip_first` - after the very first configuration version is uploaded into the workspace the run will not be triggered. But the following configurations will do. This is the default behavior. `always` - runs will be triggered automatically on every upload of the configuration version. `never` - configuration versions are uploaded into the workspace, but runs will not be triggered. enum: - always - never - skip_first type: string created-at: description: The resource creation timestamp. format: date-time readOnly: true type: string deletion-protection-changed-by-email: description: The email of a user who toggled deletion protection. nullable: true readOnly: true type: string deletion-protection-enabled: description: Designates whether deletion protection is enabled. type: boolean destroy-schedule: description: Cron expression for scheduled destroy runs. Time should be in UTC. nullable: true readOnly: true type: string execution-mode: default: remote description: |- Which execution mode to use. Valid values are `remote` and `local`. When set to `local`, the workspace will be used for state storage only. enum: - remote - local type: string force-latest-run: description: |- Indicates whether `force run` should automatically apply to latest run. Default `false`. type: boolean global-remote-state: description: Specifies if the state is globally shared within the environment. type: boolean has-resources: description: Indicates whether the workspace's current state version contains terraform resources. readOnly: true type: boolean hooks: nullable: true properties: post-apply: description: Command that should be run after terraform apply operation executed. nullable: true type: string post-plan: description: Command that should be run after terraform plan operation executed. nullable: true type: string pre-apply: description: Command that should be run before terraform apply operation executed. nullable: true type: string pre-init: description: Command that should be run before terraform init operation executed. nullable: true type: string pre-plan: description: Command that should be run before terraform plan operation executed. nullable: true type: string type: object iac-platform: default: terraform description: The IaC platform of this workspace. enum: - terraform - opentofu type: string lock-reason: description: The reason (if any) that the workspace has been locked. nullable: true readOnly: true type: string locked: description: |- Indicates whether the workspace is locked for operations. The `lock-reason` attribute carries the explanation. This semaphore is acquired and released by terraform apply and can also manage it with Lock/Unlock Workspace. Default: `false` readOnly: true type: boolean name: description: |- Workspace name which must be unique within the environment. Comprises letters, numbers, `-`, and `_` only. maxLength: 255 type: string operations: deprecated: true description: The attribute `operations` is deprecated. Use `execution-mode` instead. type: boolean permissions: readOnly: true type: object run-operation-timeout: description: The timeout for the Terraform Run operations (in minutes). nullable: true type: integer terraform-version: description: The version of Terraform the workspace performs runs on. If omitted, the system default version is assigned. type: string updated-at: description: The resource last update timestamp. format: date-time nullable: true readOnly: true type: string updated-by-email: description: The email of the last user, that updated this workspace. nullable: true readOnly: true type: string var-files: description: The list of Terraform variables files. items: type: string nullable: true type: array vcs-repo: nullable: true properties: branch: description: |- Branch of a repository the workspace is associated with. If omitted, the repository default branch will be used. nullable: true type: string dry-runs-enabled: default: true description: |- When true once a pull request into the vcs-repo.branch is opened, every push to a pull request's branch will trigger a dry run in the workspace. Default `true` type: boolean identifier: description: |- A reference to your VCS repository. For GitHub, GitHub Enterprise and GitLab the format is `/`. Azure DevOps Services has the format `//`. type: string ingress-submodules: default: false description: Specifies whether git submodules should be fetched when cloning the VCS repository. type: boolean path: default: '' deprecated: true description: The attribute `vcs-repo.path` is deprecated. Use working-directory and trigger-prefixes instead. nullable: true type: string trigger-patterns: description: |- List of path patterns in gitignore format, whose changes will trigger a run for the workspace using this binding when the CV is created. Conflicts with 'trigger-prefixes'. If 'trigger-patterns' and 'trigger-prefixes' are omitted, any change in the configuration version root will trigger a new run. nullable: true type: string trigger-prefixes: default: [] description: |- List of paths (relative to the configuration version root), whose changes will trigger a run for the workspace using this binding when the CV is created. Conflicts with 'trigger-patterns'. If 'trigger-patterns' and 'trigger-prefixes' are omitted, any change in the configuration version root will trigger a new run. items: type: string nullable: true type: array required: - identifier type: object working-directory: description: A relative path where Terraform commands will execute in. maxLength: 255 nullable: true type: string required: - name type: object id: readOnly: true type: string links: properties: self: readOnly: true type: string readOnly: true type: object relationships: properties: agent-pool: description: The ID of the agent pool. properties: data: nullable: true properties: id: type: string type: enum: - agent-pools type: string required: - type - id type: object required: - data type: object configuration-version: description: The latest uploaded configuration version. properties: data: nullable: true properties: id: type: string type: enum: - configuration-versions type: string required: - type - id type: object readOnly: true required: - data type: object created-by: description: The user, who has triggered the run. properties: data: nullable: true properties: id: type: string type: enum: - users type: string required: - type - id type: object readOnly: true required: - data type: object current-run: description: Currently executing Run. properties: data: nullable: true properties: id: type: string type: enum: - runs type: string required: - type - id type: object readOnly: true required: - data type: object environment: description: The environment this workspace belongs to. properties: data: properties: id: type: string type: enum: - environments type: string required: - type - id type: object required: - data type: object latest-configuration-version: description: The configuration version of the latest non-dry Run in this workspace. properties: data: nullable: true properties: id: type: string type: enum: - configuration-versions type: string required: - type - id type: object readOnly: true required: - data type: object latest-run: description: Latest finished Run. properties: data: nullable: true properties: id: type: string type: enum: - runs type: string required: - type - id type: object readOnly: true required: - data type: object locked-by: properties: data: nullable: true properties: id: type: string type: enum: - users type: string required: - type - id type: object readOnly: true required: - data type: object locked-by-run: properties: data: nullable: true properties: id: type: string type: enum: - runs type: string required: - type - id type: object readOnly: true required: - data type: object module: description: The ID of the module. properties: data: nullable: true properties: id: type: string type: enum: - modules type: string required: - type - id type: object readOnly: true required: - data type: object module-version: description: The ID of the module version. properties: data: nullable: true properties: id: type: string type: enum: - module-versions type: string required: - type - id type: object required: - data type: object readme-id: description: The readme for the workspace. properties: data: nullable: true properties: id: type: string type: enum: - workspace-readme type: string required: - type - id type: object readOnly: true required: - data type: object tags: properties: data: items: properties: id: type: string type: enum: - tags type: string required: - type - id type: object nullable: true type: array required: - data type: object updated-by: description: The last user, that updated this workspace. properties: data: nullable: true properties: id: type: string type: enum: - users type: string required: - type - id type: object readOnly: true required: - data type: object vcs-provider: description: VCS provider of the Run's workspace properties: data: nullable: true properties: id: type: string type: enum: - vcs-providers type: string required: - type - id type: object required: - data type: object required: - environment type: object type: enum: - workspaces type: string required: - type - attributes - relationships type: object WorkspaceDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/Workspace' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object WorkspaceListingDocument: description: |- JSON:API Document Listing see: https://jsonapi.org/format/#document-structure properties: data: items: $ref: '#/components/schemas/Workspace' type: array included: items: type: object readOnly: true type: array links: additionalProperties: type: string readOnly: true type: object meta: readOnly: true type: object type: object WorkspaceReadme: description: A WorkspaceReadme resource represents the readme file for a workspace. properties: attributes: properties: content: description: The content of the readme file. type: string created-at: description: The time when the readme record was created. format: date-time type: string type: object id: readOnly: true type: string links: additionalProperties: type: string type: object type: enum: - workspace-readme type: string required: - type type: object WorkspaceReadmeDocument: description: |- JSON:API Document. see: https://jsonapi.org/format/#document-structure properties: data: $ref: '#/components/schemas/WorkspaceReadme' included: items: type: object readOnly: true type: array meta: readOnly: true type: object type: object WorkspaceSchedule: properties: apply-schedule: nullable: true type: string destroy-schedule: nullable: true type: string type: object securitySchemes: API-Key: scheme: bearer type: http info: description: Scalr IACP API license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 title: Scalr IACP API version: unversioned openapi: 3.0.0 paths: /access-policies: get: description: | This endpoint returns a list of [IAM](https://docs.scalr.io/docs/identity-and-access-management) access policies. operationId: get_access_policies parameters: - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: Account filter in: query name: filter[account] required: false schema: type: string - description: Access Policy filter. in: query name: filter[access-policy] required: false schema: type: string - description: Environment filter in: query name: filter[environment] required: false schema: type: string - description: Workspace filter in: query name: filter[workspace] required: false schema: type: string - description: User filter in: query name: filter[user] required: false schema: type: string - description: Team filter in: query name: filter[team] required: false schema: type: string - description: Service account filter in: query name: filter[service-account] required: false schema: type: string - description: Query string in: query name: query required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - account - environment - service-account - team - user - workspace type: string type: array - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - environment - roles - service-account - team - user - workspace type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccessPolicyListingDocument' description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List Access Policies tags: - access-policies x-resource: AccessPolicy x-service: tf-api post: description: | Grant access for a member identity to a scope identity. Access is a set of `roles`. Member identity might be one of `user`, `team`, or `service-account`. Scope identity is one of `account`, `environment`, or `workspace`. Check out [identity and access management](https://docs.scalr.io/docs/identity-and-access-management) for a detailed description of the Scalr IAM model. operationId: create_access_policy parameters: - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - environment - roles - service-account - team - user - workspace type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-access-policy-request.yml schema: $ref: '#/components/schemas/AccessPolicyDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-access-policy-response.yml schema: $ref: '#/components/schemas/AccessPolicyDocument' description: Successfully created. '403': description: User unauthorized to perform this action. '404': description: Relationship not found or user unauthorized to read it. '409': description: Quota exceeded error. '422': description: Malformed request body (missing attributes, wrong types, etc.) 4XX: description: Client error. 5XX: description: Server error. summary: Create an Access Policy tags: - access-policies x-resource: AccessPolicy x-service: tf-api /access-policies/{access_policy}: delete: operationId: delete_access_policy parameters: - description: The ID of the access policy to delete. in: path name: access_policy required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Access policy deleted. '403': description: User unauthorized to perform this action. '404': description: Access policy not found. '422': description: Attempt to delete a system role. 4XX: description: Client error. 5XX: description: Server error. summary: Delete Access Policy tags: - access-policies x-resource: AccessPolicy x-service: tf-api get: description: The endpoint returns [IAM](https://docs.scalr.io/docs/identity-and-access-management) access policy by ID. operationId: get_access_policy parameters: - description: The ID of the access policy. in: path name: access_policy required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - environment - roles - service-account - team - user - workspace type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccessPolicyDocument' description: Success. '403': description: User unauthorized to perform this action. '404': description: Access policy not found. 4XX: description: Client error. 5XX: description: Server error. summary: Get an Access Policy tags: - access-policies x-resource: AccessPolicy x-service: tf-api patch: operationId: update_access_policy parameters: - description: The ID of the access policy to update. in: path name: access_policy required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - environment - roles - service-account - team - user - workspace type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccessPolicyDocument' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccessPolicyDocument' description: Success. '403': description: User unauthorized to perform this action. '404': description: Access policy not found. '422': description: Malformed request body (missing attributes, wrong types, etc.) 4XX: description: Client error. 5XX: description: Server error. summary: Update an Access Policy tags: - access-policies x-resource: AccessPolicy x-service: tf-api /access-tokens: get: description: This endpoint lists user access tokens. operationId: list_access_tokens parameters: - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - created-at - description - last-used-at type: string type: array - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - created-by type: string type: array - description: Query string in: query name: query required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccessTokenListingDocument' description: Success. '404': description: User not authorized. 4XX: description: Client error. 5XX: description: Server error. summary: List access tokens tags: - access-tokens x-resource: AccessToken x-service: tf-api post: description: This endpoint creates access token. operationId: create_access_token parameters: - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - created-by type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccessTokenDocument' responses: '201': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccessTokenDocument' description: Successfully created. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Create an Access Token tags: - access-tokens x-resource: AccessToken x-service: tf-api /access-tokens/{access_token}: delete: description: | Delete an access token by ID. operationId: delete_access_token parameters: - description: The ID of the access token to be deleted. in: path name: access_token required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Deleted. '404': description: Object not found or user unauthorized. 4XX: description: Client error. 5XX: description: Server error. summary: Delete an Access Token tags: - access-tokens x-resource: AccessToken x-service: tf-api get: description: Get an access token by ID. operationId: get_access_token parameters: - description: The ID of the access token to get. in: path name: access_token required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - created-by type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccessTokenDocument' description: Success. '404': description: Object not found or user unauthorized. 4XX: description: Client error. 5XX: description: Server error. summary: Get an Access Token tags: - access-tokens x-resource: AccessToken x-service: tf-api patch: description: | Update an access token by ID. operationId: update_access_token parameters: - description: The ID of the access token to be updated. in: path name: access_token required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - created-by type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccessTokenDocument' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccessTokenDocument' description: Successfully updated. '404': description: Object not found or user unauthorized. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Update an Access Token tags: - access-tokens x-resource: AccessToken x-service: tf-api /account-users: get: description: | This endpoint returns a list of `AccountUser` resources. To get the list of accounts the user has access to, the `filter[user]` has to be specified. To get the list of users that have access to an account the `filter[account]` has to be specified. operationId: get_account_users parameters: - description: The account filter. in: query name: filter[account] required: false schema: type: string - description: The user filter. in: query name: filter[user] required: false schema: type: string - description: The Team filter. in: query name: filter[team] required: false schema: type: string - description: The AccountUser status filter. in: query name: filter[status] required: false schema: type: string - description: Query string in: query name: query required: false schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - created-at - email - full-name - last-login-at - status type: string type: array - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - teams - user type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/list-account-users.yml schema: $ref: '#/components/schemas/AccountUserListingDocument' description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List Account to User relationships tags: - accounts_users x-resource: User x-service: tf-api /accounts: get: operationId: get_accounts parameters: - description: The account name filter. in: query name: filter[name] required: false schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - billing-plan - identity-provider - owner type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: accounts: description: The comma-separated list of fields to return in response for Account resource. type: string billing-plans: description: The comma-separated list of fields to return in response for BillingPlan resource. type: string identity-providers: description: The comma-separated list of fields to return in response for IdentityProvider resource. type: string users: description: The comma-separated list of fields to return in response for User resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccountListingDocument' description: Success. 4XX: description: Client error. 5XX: description: Server error. summary: List Accounts tags: - accounts x-resource: Account x-service: tf-api /accounts/{account}: get: description: Show details of a specific account. operationId: get_account parameters: - description: The ID of the account. in: path name: account required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - billing-plan - identity-provider - owner type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccountDocument' description: Success. '404': description: Account not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get an Account tags: - accounts x-resource: Account x-service: tf-api patch: operationId: update_account parameters: - description: The ID of the account to update. in: path name: account required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccountDocument' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccountDocument' description: Successfully updated the account. '404': description: Account or relationship not found, or user unauthorized to perform action. '422': description: Invalid arguments. 4XX: description: Client error. 5XX: description: Server error. summary: Update Account tags: - accounts x-resource: Account x-service: tf-api /accounts/{account}/actions/invite: post: description: | Invite the user to the account by adding it to the account teams and/or creating access policies within the account. If the user with a specified email does not exist - a new one will be created. The new user will be in the 'pending' status until the first login to the account. This is the preferred way to create users. operationId: invite_user_to_account parameters: - in: path name: account required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - teams - user type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/invite-user-to-account-request.yml schema: $ref: '#/components/schemas/UserInviteDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/invite-user-to-account-response.yml schema: $ref: '#/components/schemas/AccountUserDocument' description: Success. '403': description: User unauthorized to perform this action. '404': description: User, Account, not found. '422': description: Invalid team or role. 4XX: description: Client error. 5XX: description: Server error. summary: Invite a User to the Account tags: - users x-resource: User x-service: tf-api /accounts/{account}/actions/remove/{user}: delete: description: | The endpoint removes all user access policies and team bindings associated with the account. operationId: remove_user_from_account parameters: - description: The ID of the account. in: path name: account required: true schema: type: string - description: | The ID of the user. in: path name: user required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Successfully removed. '403': description: User unauthorized to perform this action. '404': description: The user or account not found. 4XX: description: Client error. 5XX: description: Server error. summary: Remove a User from the Account tags: - users x-resource: User x-service: tf-api /accounts/{account}/blob-settings: delete: description: | Delete account blob settings. The `DELETE` operation (same as `PUT`) is only allowed if the account has no blobs (e.g. states, configurations, logs) stored in Scalr. operationId: delete_account_blob_settings parameters: - description: The ID of the account. in: path name: account required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Success. '409': description: Cannot delete settings in a current state. 4XX: description: Client error. 5XX: description: Server error. summary: Delete Blob Settings tags: - account_blob_settings x-resource: AccountBlobSettings x-service: tf-api get: description: Show details of account blob storage settings. operationId: get_account_blob_settings parameters: - description: The ID of the account. in: path name: account required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccountBlobSettingsDocument' description: Success. '404': description: Account not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get Blob Settings tags: - account_blob_settings x-resource: AccountBlobSettings x-service: tf-api patch: description: | Update account blob settings credentials. It's also possible to override the project, bucket, and encryption key if the Scalr account is empty. Once the account has at least one blob (e.g. state, configuration, log) stored in Scalr, the project, bucket and encryption key attributes become immutable and API will return `409` on any attempt to modify them. operationId: update_account_blob_settings parameters: - description: The ID of the account. in: path name: account required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccountBlobSettingsDocument' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccountBlobSettingsDocument' description: Success. '404': description: Custom blob settings are not set. Do `PUT` to create them. '409': description: Cannot update settings in a current state. '422': description: Invalid arguments. 4XX: description: Client error. 5XX: description: Server error. summary: Update Blob Settings tags: - account_blob_settings x-resource: AccountBlobSettings x-service: tf-api put: description: | Create or Replace account blob storage settings. The `PUT` operation (same as `DELETE`) is allowed only when the account has no blobs (e.g. states, configurations, logs) stored in Scalr yet. operationId: replace_account_blob_settings parameters: - description: The ID of the account. in: path name: account required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/replace-account-blob-settings-request.yml schema: $ref: '#/components/schemas/AccountBlobSettingsDocument' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/replace-account-blob-settings-response.yml schema: $ref: '#/components/schemas/AccountBlobSettingsDocument' description: Success. '409': description: Cannot replace settings in a current state. '422': description: Invalid arguments. 4XX: description: Client error. 5XX: description: Server error. summary: Replace Blob Settings tags: - account_blob_settings x-resource: AccountBlobSettings x-service: tf-api /accounts/{account}/metrics: get: operationId: get_metrics parameters: - description: | The ID of the account in: path name: account required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/json: schema: $ref: '#/components/schemas/AccountMetrics' description: Success. '404': description: Account or relationship not found, or user unauthorized to perform an action. 4XX: description: Client error. 5XX: description: Server error. summary: Shows Account Metrics tags: - accounts x-resource: Account x-service: tf-api /agent-pools: get: description: | This endpoint returns a list of [agent pools](../../agent_pools.html#managing-agent-pools) by various filters. operationId: get_agent_pools parameters: - description: The id of the agent pool. in: query name: filter[agent-pool] required: false schema: type: string - description: The agent pool name. in: query name: filter[name] required: false schema: type: string - description: Is the agent pool VCS support enabled. in: query name: filter[vcs-enabled] required: false schema: type: string - description: The account filter. in: query name: filter[account] required: false schema: type: string - description: The environment filter. in: query name: filter[environment] required: false schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - agents - environment - workspaces type: string type: array - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - account - environment - name - vcs-enabled type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AgentPoolListingDocument' description: Success. '404': description: User not authorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List Agent Pools tags: - agent-pools x-resource: AgentPool x-service: tf-api post: description: | Create a new [agent pool](../../agent_pools.html#managing-agent-pools) resource. Agent pools can be created at the `account` or `environment` scope. The scope must be defined as part of the agent pool creation. If a pool is created at the account scope, all environments and workspaces within those environments will have access to use the pool. If a pool is created at the environment scope, then only the workspaces in that environment can use that pool. The typical flow for configuring a new agent pool involves the following operations: * Create an agent pool * [Create an access token](access-tokens.html#create-an-agent-pool-access-token) for the pool. The pool token is needed by an agent in order to join the agent pool. During the agent<->server handshake phase, the API server will generate a unique session token for each agent which will be used for all communication with the API server. * Install/Configure an agent on the customer's network. operationId: create_agent_pool parameters: - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - agents - environment - workspaces type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-agent-pool-request.yml schema: $ref: '#/components/schemas/AgentPoolDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-agent-pool-response.yml schema: $ref: '#/components/schemas/AgentPoolDocument' description: Successfully created. '403': description: User unauthorized to perform this action. '409': description: Quota exceeded error. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Create an Agent Pool tags: - agent-pools x-resource: AgentPool x-service: tf-api /agent-pools/{agent_pool}: delete: description: | This endpoint deletes an [agent pool](../../agent_pools.html#managing-agent-pools) by ID. operationId: delete_agent_pool parameters: - description: The ID of the agent pool to be deleted. in: path name: agent_pool required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Successfully deleted. '403': description: User unauthorized to perform this action. '404': description: Agent pool not found or user unauthorized. '409': description: Can't be deleted. Has busy agents. 4XX: description: Client error. 5XX: description: Server error. summary: Delete an Agent Pool tags: - agent-pools x-resource: AgentPool x-service: tf-api get: description: | Show details of a specific [agent pool](../../agent_pools.html#managing-agent-pools). operationId: get_agent_pool parameters: - description: The ID of the agent pool to show. in: path name: agent_pool required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - agents - environment - workspaces type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AgentPoolDocument' description: Success. '404': description: User not authorized or agent pool not found. 4XX: description: Client error. 5XX: description: Server error. summary: Get an Agent Pool tags: - agent-pools x-resource: AgentPool x-service: tf-api patch: description: | This endpoint updates an [agent pool](../../agent_pools.html#managing-agent-pools) by ID. operationId: update_agent_pool parameters: - description: The ID of the agent pool to be updated. in: path name: agent_pool required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - agents - environment - workspaces type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/update-agent-pool-bulk-link-request.yml schema: $ref: '#/components/schemas/AgentPoolDocument' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AgentPoolDocument' description: Successfully updated. '403': description: User unauthorized to perform this action. '404': description: User not authorized or agent pool not found. '409': description: Quota exceeded error. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Update an Agent Pool tags: - agent-pools x-resource: AgentPool x-service: tf-api /agent-pools/{agent_pool}/access-tokens: get: operationId: list_agent_pool_access_tokens parameters: - description: The ID of the agent pool to list access tokens for. in: path name: agent_pool required: true schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - created-at - description - last-used-at type: string type: array - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - created-by type: string type: array - description: Query string in: query name: query required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccessTokenListingDocument' description: Success. '404': description: Object not found or user unauthorized. 4XX: description: Client error. 5XX: description: Server error. summary: List Agent Pool Access Tokens tags: - access-tokens x-resource: AccessToken x-service: tf-api post: description: | This endpoint creates agent pool's access token. operationId: create_agent_pool_token parameters: - description: The ID of the agent pool to create a token for. in: path name: agent_pool required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - created-by type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-agent-pool-token-request.yml schema: $ref: '#/components/schemas/AccessTokenDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-agent-pool-token-response.yml schema: $ref: '#/components/schemas/AccessTokenDocument' description: Successfully created. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Create an Agent Pool Access Token tags: - access-tokens x-resource: AccessToken x-service: tf-api /agents: get: description: | The endpoint returns a list of agents by various filters. operationId: get_agents parameters: - description: The agent identifier. in: query name: filter[agent] required: false schema: type: string - description: The agent pool identifier. in: query name: filter[agent-pool] required: false schema: type: string - description: The agent name. in: query name: filter[name] required: false schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - pool type: string type: array - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - last-seen-at - name - os - pool - status - version type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AgentListingDocument' description: Success. '404': description: User not authorized. 4XX: description: Client error. 5XX: description: Server error. summary: List Agents tags: - agents x-resource: Agent x-service: tf-api /agents/{agent}: delete: description: | This endpoint deletes an agent by ID. Only `offline` or `errored` agents can be removed from the pool. Offline or errored agents will be removed automatically after 7 days of inactivity. operationId: delete_agent parameters: - description: The ID of the agent to be deleted. in: path name: agent required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Deleted. '409': description: The agent is busy and can't be deleted. 4XX: description: Client error. 5XX: description: Server error. summary: Delete an Agent tags: - agents x-resource: Agent x-service: tf-api get: description: Show details of a specific agent. operationId: get_agent parameters: - description: The ID of the agent to show. in: path name: agent required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - pool type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AgentDocument' description: Success. '404': description: User not authorized or agent not found. 4XX: description: Client error. 5XX: description: Server error. summary: Get an Agent tags: - agents x-resource: Agent x-service: tf-api /applies/{apply}: get: description: Show details of a specific Terraform Apply stage. operationId: get_apply parameters: - description: The ID of the apply. in: path name: apply required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-apply.yml schema: $ref: '#/components/schemas/ApplyDocument' description: Success. '403': description: Apply not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get an Apply tags: - applies x-resource: Apply x-service: tf-api /applies/{apply}/output: get: description: Download the raw output of the terraform apply stage. operationId: get_apply_log parameters: - description: |- The ID of the apply. Obtain it from the [Get a Workspace](workspaces.html#get-a-workspace) endpoint. in: path name: apply required: true schema: type: string - description: Strip ANSI escape codes. in: query name: clean required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': description: Apply log. '204': description: Apply has not yet completed or can't be served. '302': description: The location of the temporary download link. '404': description: Apply not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Apply Log tags: - applies x-resource: Apply x-service: tf-api /configuration-versions: get: operationId: get_configuration_versions parameters: - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - vcs-revision type: string type: array - description: The ID of the workspace to list configurations from. example: ws-spturhj1dckd8so in: query name: filter[workspace] required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-configuration-versions.yml schema: $ref: '#/components/schemas/ConfigurationVersionListingDocument' description: The request was successful. '404': description: Workspace not found or user unauthorized to perform action 4XX: description: Client error. 5XX: description: Server error. summary: List Configuration Versions tags: - configuration-versions x-resource: ConfigurationVersion x-service: tf-api post: description: Create the new configuration version for specific workspace operationId: create_configuration_version parameters: - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: 0-tarball: $ref: examples/create-configuration-version-0-request-body.yml 1-vcs: $ref: examples/create-configuration-version-1-request-body.yml schema: $ref: '#/components/schemas/ConfigurationVersionDocument' responses: '201': content: application/vnd.api+json: examples: 0-tarball: $ref: examples/create-configuration-version-0-response.yml 1-vcs: $ref: examples/create-configuration-version-1-response.yml schema: $ref: '#/components/schemas/ConfigurationVersionDocument' description: The request was successful. '404': description: Workspace not found or user unauthorized to perform action. '409': description: Conflict; check the error object for more information. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Create a Configuration Version tags: - configuration-versions x-resource: ConfigurationVersion x-service: tf-api /configuration-versions/{configuration_version}: get: description: Show details of a specific Configuration Version. operationId: get_configuration_version parameters: - description: The ID of the configuration version. in: path name: configuration_version required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - vcs-revision type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-configuration-version.yml schema: $ref: '#/components/schemas/ConfigurationVersionDocument' description: The request was successful. '404': description: Configuration version not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Configuration Version tags: - configuration-versions x-resource: ConfigurationVersion x-service: tf-api /configuration-versions/{configuration_version}/download: get: description: Download tar.gz archive with terraform configuration templates. operationId: download_configuration_version parameters: - description: The ID of the configuration version. in: path name: configuration_version required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': description: '' '302': description: The location of the temporary download link. '404': description: Configuration version not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Download Configuration Version tags: - configuration-versions x-resource: ConfigurationVersion x-service: tf-api /cost-estimates/{cost_estimate}: get: description: Show details of a specific Cost Estimate phase. operationId: get_cost_estimate parameters: - description: |- The ID of the cost estimate. Obtain it from the [Get a Workspace](workspaces.html#get-a-workspace) endpoint. in: path name: cost_estimate required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-cost-estimate.yml schema: $ref: '#/components/schemas/CostEstimateDocument' description: Success. '404': description: Cost estimate not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Cost Estimate tags: - cost-estimates x-resource: CostEstimate x-service: tf-api /cost-estimates/{cost_estimate}/breakdown: get: description: |- This endpoint generates a temporary public URL, that can be used to download a [JSON formatted cost breakdown](https://www.infracost.io/docs/multi_project/report/#examples). operationId: get_cost_estimate_breakdown parameters: - description: |- The ID of the cost estimate. Obtain it from the [Get a Workspace](workspaces.html#get-a-workspace) endpoint. in: path name: cost_estimate required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '302': description: The location of the temporary download link. '404': description: Cost estimate not found or user unauthorized to perform action. '422': description: The cost estimation breakdown is not ready yet. 4XX: description: Client error. 5XX: description: Server error. summary: Cost breakdown JSON output tags: - cost-estimates x-resource: CostEstimate x-service: tf-api /cost-estimates/{cost_estimate}/output: get: description: |- This endpoint generates a temporary public URL, that can be used to download a raw `text/plan` output of the cost estimation. operationId: get_cost_estimate_log parameters: - description: |- The ID of the cost estimate. Obtain it from the [Get a Workspace](workspaces.html#get-a-workspace) endpoint. in: path name: cost_estimate required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': description: Success. '404': description: Cost estimate not found or user unauthorized to perform action. '422': description: The cost estimation output is not ready yet. 4XX: description: Client error. 5XX: description: Server error. summary: Cost Estimate log tags: - cost-estimates x-resource: CostEstimate x-service: tf-api /endpoints: get: description: This endpoint lists endpoints. (Deprecated) operationId: list_endpoints parameters: - description: The ID of the Environment in: query name: filter[environment] required: false schema: type: string - description: The ID of the Account in: query name: filter[account] required: false schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - name - url type: string type: array - description: Query string in: query name: query required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/list-endpoints.yml schema: $ref: '#/components/schemas/EndpointListingDocument' description: Success. '404': description: Account or environment not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: List Endpoints tags: - endpoints x-resource: Endpoint x-service: tf-api post: description: Create a new endpoint in the account or environment. (Deprecated) operationId: create_endpoint parameters: - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-endpoint-request-body.yml schema: $ref: '#/components/schemas/EndpointDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-endpoint-response.yml schema: $ref: '#/components/schemas/EndpointDocument' description: The endpoint was created. '404': description: Account or environment relationship not found, or user unauthorized to perform action. '422': description: Invalid arguments. 4XX: description: Client error. 5XX: description: Server error. summary: Create an Endpoint tags: - endpoints x-resource: Endpoint x-service: tf-api /endpoints/{endpoint}: delete: operationId: delete_endpoint parameters: - description: The ID of the endpoint to delete. (Deprecated) in: path name: endpoint required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Successfully deleted the endpoint. '404': description: Endpoint not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Delete an Endpoint tags: - endpoints x-resource: Endpoint x-service: tf-api get: description: Show details of a specific endpoint. (Deprecated) operationId: get_endpoint parameters: - description: The ID of the endpoint. in: path name: endpoint required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/EndpointDocument' description: Success. '404': description: Endpoint not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get an Endpoint tags: - endpoints x-resource: Endpoint x-service: tf-api patch: operationId: update_endpoint parameters: - description: The ID of the endpoint to update. (Deprecated) in: path name: endpoint required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/EndpointDocument' responses: '201': content: application/vnd.api+json: schema: $ref: '#/components/schemas/EndpointDocument' description: Successfully updated the endpoint. '404': description: Endpoint or relationship not found, or user unauthorized to perform action. '422': description: Invalid arguments. 4XX: description: Client error. 5XX: description: Server error. summary: Update Endpoint tags: - endpoints x-resource: Endpoint x-service: tf-api /environments: get: description: This endpoint lists account environments. operationId: list_environments parameters: - description: The ID of the Account in: query name: filter[account] required: false schema: type: string - description: The ID of the Environment in: query name: filter[environment] required: false schema: type: string - description: 'Filter by latest run date. Example: `filter[latest-run-date]=between:2022-01-01T00:00:00Z,2022-02-01T00:00:00Z`' in: query name: filter[latest-run-date] required: false schema: type: string - description: The ID of the Policy Group. in: query name: filter[policy-group] required: false schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: Query string, search by id, name. in: query name: query required: false schema: type: string - description: Filter environments by tags in: query name: filter[tag] required: false schema: type: string - description: The environment name filter. in: query name: filter[name] required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - account - cost-estimation-enabled - created-at - created-by-email - name type: string type: array - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - created-by - default-provider-configurations - policy-groups - provider-configurations - tags type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: accounts: description: The comma-separated list of fields to return in response for Account resource. type: string environments: description: The comma-separated list of fields to return in response for Environment resource. type: string policy-groups: description: The comma-separated list of fields to return in response for PolicyGroup resource. type: string provider-configurations: description: The comma-separated list of fields to return in response for ProviderConfiguration resource. type: string tags: description: The comma-separated list of fields to return in response for Tag resource. type: string users: description: The comma-separated list of fields to return in response for User resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-environments.yml schema: $ref: '#/components/schemas/EnvironmentListingDocument' description: Success. '404': description: Account not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: List Environments tags: - environments x-resource: Environment x-service: tf-api post: description: Create a new environment in the account. operationId: create_environment parameters: - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: accounts: description: The comma-separated list of fields to return in response for Account resource. type: string environments: description: The comma-separated list of fields to return in response for Environment resource. type: string policy-groups: description: The comma-separated list of fields to return in response for PolicyGroup resource. type: string provider-configurations: description: The comma-separated list of fields to return in response for ProviderConfiguration resource. type: string tags: description: The comma-separated list of fields to return in response for Tag resource. type: string users: description: The comma-separated list of fields to return in response for User resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-environment-request-body.yml tags: $ref: examples/create-environment-request-tags.yml schema: $ref: '#/components/schemas/EnvironmentDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-environment-response.yml schema: $ref: '#/components/schemas/EnvironmentDocument' description: The environment was created. '404': description: Account relationship not found, or user unauthorized to perform action. '422': description: Invalid arguments. 4XX: description: Client error. 5XX: description: Server error. summary: Create an Environment tags: - environments x-resource: Environment x-service: tf-api /environments/{environment}: delete: operationId: delete_environment parameters: - description: The ID of the environment to delete. in: path name: environment required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Successfully deleted the environment. '403': description: Environment deletion is forbidden. '404': description: Environment not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Delete an Environment tags: - environments x-resource: Environment x-service: tf-api get: description: Show details of a specific environment. operationId: get_environment parameters: - description: The ID of the environment. in: path name: environment required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - created-by - default-provider-configurations - policy-groups - provider-configurations - tags type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: accounts: description: The comma-separated list of fields to return in response for Account resource. type: string environments: description: The comma-separated list of fields to return in response for Environment resource. type: string policy-groups: description: The comma-separated list of fields to return in response for PolicyGroup resource. type: string provider-configurations: description: The comma-separated list of fields to return in response for ProviderConfiguration resource. type: string tags: description: The comma-separated list of fields to return in response for Tag resource. type: string users: description: The comma-separated list of fields to return in response for User resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-environment.yml schema: $ref: '#/components/schemas/EnvironmentDocument' description: Success. '404': description: Environment not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get an Environment tags: - environments x-resource: Environment x-service: tf-api patch: operationId: update_environment parameters: - description: The ID of the environment to update. in: path name: environment required: true schema: type: string - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: accounts: description: The comma-separated list of fields to return in response for Account resource. type: string environments: description: The comma-separated list of fields to return in response for Environment resource. type: string policy-groups: description: The comma-separated list of fields to return in response for PolicyGroup resource. type: string provider-configurations: description: The comma-separated list of fields to return in response for ProviderConfiguration resource. type: string tags: description: The comma-separated list of fields to return in response for Tag resource. type: string users: description: The comma-separated list of fields to return in response for User resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/update-environment-request-body.yml link-policygroups: $ref: examples/update-environment-request-link-policygroups.yml schema: $ref: '#/components/schemas/EnvironmentDocument' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/update-environment-response.yml schema: $ref: '#/components/schemas/EnvironmentDocument' description: Successfully updated the environment. '404': description: Environment or relationship not found, or user unauthorized to perform action. '422': description: Invalid arguments. 4XX: description: Client error. 5XX: description: Server error. summary: Update Environment tags: - environments x-resource: Environment x-service: tf-api /environments/{environment}/relationships/tags: delete: description: | This endpoint removes given [tags](tags.html#the-tag-resource) from the environment. operationId: delete_environment_tags parameters: - description: | The environment whose tags will be deleted. in: path name: environment required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/update-resource-tags-request.yml schema: $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument' responses: '204': description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: Delete environment's tags tags: - environments x-resource: Environment x-service: tf-api get: description: | This endpoint returns a list of [tags](tags.html#the-tag-resource), assigned to an environment. operationId: list_environment_tags parameters: - description: | The environment to list tags for. in: path name: environment required: true schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/list-environment-tags-response.yml schema: $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument' description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List environment's tags tags: - environments x-resource: Environment x-service: tf-api patch: description: | This endpoint completely replaces environment's tags with provided list. operationId: replace_environment_tags parameters: - description: | The environment whose tags will be replaced. in: path name: environment required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/update-resource-tags-request.yml empty: $ref: examples/replace-resource-tags-empty-request.yml schema: $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument' responses: '204': description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: Replace environment's tags tags: - environments x-resource: Environment x-service: tf-api post: description: | This endpoint assigns the list of [tags](tags.html#the-tag-resource) to the environment. operationId: add_environment_tags parameters: - description: | The environment to add the tags to. in: path name: environment required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/update-resource-tags-request.yml schema: $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument' responses: '204': description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: Add tags to the environment tags: - environments x-resource: Environment x-service: tf-api /event-definitions: get: operationId: list_event_definitions parameters: - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/list-event-definitions.yml schema: $ref: '#/components/schemas/EventDefinitionListingDocument' description: Success. '404': description: User unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: List Event Definitions tags: - event-definitions x-resource: EventDefinition x-service: tf-api /integrations/slack: get: description: This endpoint returns a list of Slack integrations. operationId: list_slack_integrations parameters: - description: The ID of the Account in: query name: filter[account] required: true schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - environments - workspaces type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/SlackIntegrationListingDocument' description: | Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List Slack Integrations tags: - slack-integrations x-resource: SlackIntegration x-service: tf-api post: description: This endpoint creates Slack integration. operationId: create_slack_integration parameters: - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-slack-integration-request.yml schema: $ref: '#/components/schemas/SlackIntegrationDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-slack-integration-response.yml schema: $ref: '#/components/schemas/SlackIntegrationDocument' description: Successfully created. '404': description: Resource not found or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Create Slack Integration tags: - slack-integrations x-resource: SlackIntegration x-service: tf-api /integrations/slack/{account}/connection: delete: description: Remove Slack App connection for the account. operationId: delete_slack_connection parameters: - description: The ID of the account. in: path name: account required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Success. '403': description: User unauthorized to perform this action. '404': description: Account or connection not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Delete Slack connection tags: - slack-connections x-resource: SlackConnection x-service: tf-api get: description: Show details of account's Slack App connection. operationId: get_slack_connection parameters: - description: The ID of the account. in: path name: account required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-slack-connection-response.yml schema: $ref: '#/components/schemas/SlackConnectionDocument' description: Success. '403': description: User unauthorized to perform this action. '404': description: Account not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get Slack connection tags: - slack-connections x-resource: SlackConnection x-service: tf-api /integrations/slack/{account}/connection/channels: get: description: Get a list of channels from associated Slack workspace. operationId: list_slack_channels parameters: - description: The ID of the account. in: path name: account required: true schema: type: string - description: The search string. Supports search by channel name. in: query name: query required: false schema: type: string - description: Invalidate cache for the request in: query name: ignore_cache required: false schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/json: examples: default: $ref: examples/list-slack-channels-response.yml schema: $ref: '#/components/schemas/SlackChannelFieldsetsListingDocument' description: Success. '403': description: User unauthorized to perform this action. '404': description: Account or connection not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: List Slack channels tags: - slack-connections x-resource: SlackConnection x-service: tf-api /integrations/slack/{slack_integration}: delete: description: This endpoint deletes Slack integration. operationId: delete_slack_integration parameters: - description: The ID of the Slack integration to delete. in: path name: slack_integration required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Successfully deleted the Slack integration. '404': description: Integration not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Delete the Slack integration tags: - slack-integrations x-resource: SlackIntegration x-service: tf-api get: description: Show details of a specific Slack integration. operationId: get_slack_integration parameters: - description: The ID of the integration. in: path name: slack_integration required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - environments - workspaces type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-slack-integration-response.yml schema: $ref: '#/components/schemas/SlackIntegrationDocument' description: Success. '404': description: Integration not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get Slack Integration tags: - slack-integrations x-resource: SlackIntegration x-service: tf-api patch: description: This endpoint updates Slack integration. operationId: update_slack_integration parameters: - description: The ID of the Slack integration to update. in: path name: slack_integration required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/SlackIntegrationDocument' responses: '201': content: application/vnd.api+json: schema: $ref: '#/components/schemas/SlackIntegrationDocument' description: | Success. '404': description: Resource not found or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Update Slack Integration tags: - slack-integrations x-resource: SlackIntegration x-service: tf-api /integrations/webhooks: get: description: This endpoint returns a list of webhooks. operationId: list_webhook_integrations parameters: - description: Enabled `true|false` only webhooks in: query name: filter[enabled] required: false schema: type: string - description: The ID of the Account in: query name: filter[account] required: true schema: type: string - description: The environment filter in: query name: filter[environment] required: false schema: type: string - description: The ID of the Event definition in: query name: filter[event] required: false schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - name type: string type: array - description: Query string in: query name: query required: false schema: type: string - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: webhook-integrations: description: The comma-separated list of fields to return in response for WebhookIntegration resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/WebhookIntegrationListingDocument' description: Success. '404': description: |- Account not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: List Webhooks tags: - webhook-integrations x-resource: WebhookIntegration x-service: tf-api post: description: | Create a new webhook integration operationId: create_webhook_integration parameters: - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: webhook-integrations: description: The comma-separated list of fields to return in response for WebhookIntegration resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-webhook-integration-request.yml schema: $ref: '#/components/schemas/WebhookIntegrationDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/get-webhook-integration-response.yml schema: $ref: '#/components/schemas/WebhookIntegrationDocument' description: Successfully created. '404': description: Relationship not found, or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Create Webhook integration tags: - webhook-integrations x-resource: WebhookIntegration x-service: tf-api /integrations/webhooks/{webhook}: delete: description: The endpoint deletes webhook by ID. operationId: delete_webhook_integration parameters: - description: The ID of the webhook to delete. in: path name: webhook required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Successfully deleted. '404': description: Webhook not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Delete a Webhook integration tags: - webhook-integrations x-resource: WebhookIntegration x-service: tf-api get: description: Show details of a specific webhook. operationId: get_webhook_integration parameters: - description: The ID of the webhook. in: path name: webhook required: true schema: type: string - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: webhook-integrations: description: The comma-separated list of fields to return in response for WebhookIntegration resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-webhook-integration-response.yml schema: $ref: '#/components/schemas/WebhookIntegrationDocument' description: Success. '404': description: Webhook not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Webhook tags: - webhook-integrations x-resource: WebhookIntegration x-service: tf-api patch: description: This endpoint updates webhook by ID. operationId: update_webhook_integration parameters: - description: | The ID of the webhook to update. in: path name: webhook required: true schema: type: string - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: webhook-integrations: description: The comma-separated list of fields to return in response for WebhookIntegration resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/update-webhook-integration-request.yml schema: $ref: '#/components/schemas/WebhookIntegrationDocument' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/WebhookIntegrationDocument' description: Successfully updated. '404': description: Webhook or relationship not found, or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Update Webhook integration tags: - webhook-integrations x-resource: WebhookIntegration x-service: tf-api /metrics: get: operationId: get_open_metrics parameters: - $ref: '#/components/parameters/PreferParam' responses: '200': description: Success. '404': description: Account or relationship not found, or user unauthorized to perform an action. 4XX: description: Client error. 5XX: description: Server error. summary: Shows Account Metrics in OpenMetrics format tags: - metrics x-resource: null x-service: tf-api /module-versions: get: description: | This endpoint lists versions of a particular module. The query parameter `filter[module]` with Module ID is required. operationId: list_module_versions parameters: - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: Filter module versions by module in: query name: filter[module] required: true schema: type: string - description: Filter module versions by status in: query name: filter[status] required: false schema: type: string - description: Filter module versions by semantic version in: query name: filter[version] required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - version type: string type: array - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - module - vcs-revision type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: module-versions: description: The comma-separated list of fields to return in response for ModuleVersion resource. type: string modules: description: The comma-separated list of fields to return in response for Module resource. type: string vcs-revisions: description: The comma-separated list of fields to return in response for VcsRevision resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-module-versions.yml schema: $ref: '#/components/schemas/ModuleVersionListingDocument' description: Success. '404': description: Module versions not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: List Module Versions tags: - modules x-resource: ModuleVersion x-service: tf-api /module-versions/{module_version}: get: description: Show details of a specific terraform module version. operationId: get_module_version parameters: - description: The ID of the module version to show. in: path name: module_version required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - module - vcs-revision type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-module-version.yml schema: $ref: '#/components/schemas/ModuleVersionDocument' description: Success. '404': description: Module version not found or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Get a Module Version tags: - modules x-resource: ModuleVersion x-service: tf-api /module-versions/{module_version}/actions/resync: post: description: | Trigger resync of the Module Version associated with the `relationships.vcs-revision`. Only modules associated with a VCS can be resynchronized. operationId: resync_module_version parameters: - in: path name: module_version required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Successfully triggered resync of the module version. '409': description: Module Version not bound to the VCS repository or another sync in progress. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Resync a Module Version tags: - modules x-resource: ModuleVersion x-service: tf-api /modules: get: description: | This endpoint lists modules by various filters. To list modules accessible from a certain environment, `filter[environment]` has to be specified. Modules from the account which this environment belongs as well as globally published modules will be listed as well. To list modules accessible from a certain account, `filter[account]` has to be specified. Modules published globally will be listed as well. To list modules accessible globally, both `filter[account]=null` and `filter[environment]=null` have to be specified. If no filters were specified, all modules which the user has read access to will be listed. operationId: list_modules parameters: - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: Filter modules by name in: query name: filter[name] required: false schema: type: string - description: Filter modules by provider in: query name: filter[provider] required: false schema: type: string - description: Filter modules by source in: query name: filter[source] required: false schema: type: string - description: Filter modules by status in: query name: filter[status] required: false schema: type: string - description: Filter modules by environment in: query name: filter[environment] required: false schema: type: string - description: Filter modules by account in: query name: filter[account] required: false schema: type: string - description: Filter modules by module-version status in: query name: filter[module-versions][status] required: false schema: type: string - description: Filter modules by module-version is-root-module in: query name: filter[module-versions][is-root-module] required: false schema: type: string - description: The ID of the VCS provider in: query name: filter[vcs-provider] required: false schema: type: string - description: Query string, search by id, name, provider, and submodules recursively in: query name: query required: false schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - created-by - environment - latest-module-version - module-versions - vcs-provider type: string type: array - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - created-at - environment - name type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: environments: description: The comma-separated list of fields to return in response for Environment resource. type: string module-versions: description: The comma-separated list of fields to return in response for ModuleVersion resource. type: string modules: description: The comma-separated list of fields to return in response for Module resource. type: string users: description: The comma-separated list of fields to return in response for User resource. type: string vcs-providers: description: The comma-separated list of fields to return in response for VcsProvider resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-modules.yml schema: $ref: '#/components/schemas/ModuleListingDocument' description: Success. '404': description: Modules not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: List Modules tags: - modules x-resource: Module x-service: tf-api post: description: | This endpoint creates a Module from a VCS repository. The module's source code directory should follow the [standard module structure](https://www.terraform.io/docs/language/modules/develop/structure.html). Scalr extracts various meta information from the module's source: * It's important to provide each `variable` and `output` blocks with a meaningful descriptions, as they will be displayed in a Module and Workspace Variables pages for your internal users. * README or README.md file will be displayed on a Module page. * Nested modules from `modules/` directory will be searchable and available though the Registry just like top-level modules. Modules can be published on both `account` and `environment` scopes. If neither scope is specified in the request body, the module will be published in the same scope that the related `vcs-provider` is published. operationId: create_module parameters: - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: 0-repo-with-mod: $ref: examples/create-module-request-repo-with-mod.yml 1-mod-in-subdir: $ref: examples/create-module-request-mod-in-a-subdirectory.yml 2-mono-repo-package: $ref: examples/create-module-request-mono-repo-package.yml 3-mono-repo-nss: $ref: examples/create-module-request-mono-repo-with-tag-namespaces.yml schema: $ref: '#/components/schemas/ModuleDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-module-response.yml schema: $ref: '#/components/schemas/ModuleDocument' description: Successfully created module. '403': description: User unauthorized to perform action. '404': description: Relationship resource not found, or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Publish a Module tags: - modules x-resource: Module x-service: tf-api /modules/{module}: delete: description: | This endpoint removes the module from the registry. operationId: delete_module parameters: - description: | The ID of the module. in: path name: module required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Success. '403': description: Module is in use and can not be removed. '404': description: Module not found or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Unpublish a Module tags: - modules x-resource: Module x-service: tf-api get: description: Show details of a specific terraform module. operationId: get_module parameters: - description: The ID of the module to show. in: path name: module required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - created-by - environment - latest-module-version - module-versions - vcs-provider type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-module.yml schema: $ref: '#/components/schemas/ModuleDocument' description: Success. '404': description: Module not found or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Get a Module tags: - modules x-resource: Module x-service: tf-api /modules/{module}/actions/resync: post: description: Trigger resync of the Module associated with the VCS repository. operationId: resync_module parameters: - description: | The ID of the module to resync. in: path name: module required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/json: schema: $ref: '#/components/schemas/ModuleResyncRequest' responses: '204': description: Success. '404': description: Module not found or user unauthorized to perform action. '409': description: Module not bound to the VCS repository or another sync in progress. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Resync a Module tags: - modules x-resource: Module x-service: tf-api /permissions: get: description: |- This endpoint returns a list of all Scalr [IAM](https://docs.scalr.io/docs/identity-and-access-management) permissions, available to use in a [Role](roles.html) resource. operationId: get_permissions parameters: - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/list-permissions.yml schema: $ref: '#/components/schemas/PermissionListingDocument' description: Success. 4XX: description: Client error. 5XX: description: Server error. summary: List Permissions tags: - permissions x-resource: Permission x-service: tf-api /permissions/{permission}: get: description: Show details of a specific Scalr IAM Permission. operationId: get_permission parameters: - description: The ID of the permission. in: path name: permission required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/PermissionDocument' description: Success. '404': description: Permission not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Permission tags: - permissions x-resource: Permission x-service: tf-api /ping: get: description: Checks the connection to the API server operationId: ping parameters: - $ref: '#/components/parameters/PreferParam' responses: '200': description: Alive 4XX: description: Client error. 5XX: description: Server error. summary: Ping tags: - ping x-resource: null x-service: tf-api /plans/{plan}: get: description: Show details of a specific Terraform Plan stage. operationId: get_plan parameters: - description: The ID of the plan. in: path name: plan required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-plan.yml schema: $ref: '#/components/schemas/PlanDocument' description: Success. '403': description: Plan not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Plan tags: - plans x-resource: Plan x-service: tf-api /plans/{plan}/json-output: get: description: Download JSON formatted execution plan. operationId: get_json_output parameters: - description: |- The ID of the plan. Obtain it from the [Get a Workspace](workspaces.html#get-a-workspace) endpoint. in: path name: plan required: true schema: type: string - description: Format of the response. in: query name: format required: false schema: enum: - text - gzip type: string - $ref: '#/components/parameters/PreferParam' responses: '200': description: Terraform json plan. '204': description: Plan has not yet completed. '404': description: Plan not found or user unauthorized to perform action. '413': description: Plan cannot be served due to size limitations. 4XX: description: Client error. 5XX: description: Server error. summary: JSON Output tags: - plans x-resource: Plan x-service: tf-api /plans/{plan}/output: get: description: Download the raw output of the terraform plan stage. operationId: get_plan_log parameters: - description: |- The ID of the plan. Obtain it from the [Get a Workspace](workspaces.html#get-a-workspace) endpoint. in: path name: plan required: true schema: type: string - description: Strip ANSI escape codes. in: query name: clean required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': description: Plan log. '204': description: Plan has not yet completed or can't be served. '302': description: The location of the temporary download link. '404': description: Plan not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Plan Log tags: - plans x-resource: Plan x-service: tf-api /plans/{plan}/sanitized-json-output: get: description: Download plan file in machine-readable format with sanitized sensitive values. operationId: get_sanitized_json_output parameters: - description: |- The ID of the plan. Obtain it from the [Get a Workspace](workspaces.html#get-a-workspace) endpoint. in: path name: plan required: true schema: type: string - description: Format of the response. in: query name: format required: false schema: enum: - text - gzip type: string - $ref: '#/components/parameters/PreferParam' responses: '200': description: Sanitized terraform json plan. '204': description: Plan has not yet completed or can't be served. '307': description: |- Redirects to JSON Output if the API server is not sure that the plan can be correctly sanitized and a user permissions allow to read sensitive plan values. '404': description: Plan not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Sanitized JSON Output tags: - plans x-resource: Plan x-service: tf-api /policies/{policy}: get: description: Show details of a specific OPA policy. operationId: get_policy parameters: - description: The ID of the policy to show. in: path name: policy required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/PolicyDocument' description: Success. '403': description: User unauthorized to perform this action. '404': description: User not authorized or policy not found. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Policy tags: - policies x-resource: Policy x-service: tf-api /policy-checks/{policy_check}: get: description: Show details of a specific Terraform policy check stage. operationId: get_policy_check parameters: - description: The ID of the policy check. in: path name: policy_check required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-policy-check.yml schema: $ref: '#/components/schemas/PolicyCheckDocument' description: Success. '403': description: Policy check not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Policy Check tags: - policy-checks x-resource: PolicyCheck x-service: tf-api /policy-checks/{policy_check}/actions/override: post: description: This endpoint overrides a soft-mandatory policy. operationId: override_policy parameters: - description: The ID of the policy check to override. in: path name: policy_check required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-policy-check-overriden.yml schema: $ref: '#/components/schemas/PolicyCheckDocument' description: Success. '404': description: Policy check not found or user unauthorized to perform action. '409': description: Override is not possible in a current policy-check or run status. 4XX: description: Client error. 5XX: description: Server error. summary: Override Policy tags: - policy-checks x-resource: PolicyCheck x-service: tf-api /policy-checks/{policy_check}/output: get: description: Download the raw output of the OPA policy check stage. operationId: get_policy_checks_log parameters: - description: |- The ID of the policy check. Obtain it from the [Get a Workspace](workspaces.html#get-a-workspace) endpoint. in: path name: policy_check required: true schema: type: string - description: Strip ANSI escape codes. in: query name: clean required: false schema: default: false type: boolean - $ref: '#/components/parameters/PreferParam' responses: '302': description: The location of the temporary download link. '404': description: Policy check not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Policy Check Log tags: - policy-checks x-resource: PolicyCheck x-service: tf-api /policy-groups: get: description: This endpoint returns a list of [policy groups](../../opa.html). operationId: list_policy_groups parameters: - description: Filter dry groups by master policy group id in: query name: filter[master-policy-group] required: false schema: type: string - description: Filter by policy group id in: query name: filter[policy-group] required: false schema: type: string - description: Environment filter in: query name: filter[environment] required: false schema: type: string - description: The ID of the software version in: query name: filter[software-version] required: false schema: type: string - description: The ID of the VCS provider in: query name: filter[vcs-provider] required: false schema: type: string - description: The policy group name filter. in: query name: filter[name] required: false schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - policies - vcs-provider - vcs-revision type: string type: array - description: Query string in: query name: query required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - account - created-at - name - status type: string type: array - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: accounts: description: The comma-separated list of fields to return in response for Account resource. type: string policies: description: The comma-separated list of fields to return in response for Policy resource. type: string policy-groups: description: The comma-separated list of fields to return in response for PolicyGroup resource. type: string vcs-providers: description: The comma-separated list of fields to return in response for VcsProvider resource. type: string vcs-revisions: description: The comma-separated list of fields to return in response for VcsRevision resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/list-policy-groups.yml schema: $ref: '#/components/schemas/PolicyGroupListingDocument' description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List Policy Groups tags: - policy-groups x-resource: PolicyGroup x-service: tf-api post: description: Create a new [policy group](../../opa.html) in the account. operationId: create_policy_group parameters: - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - policies - vcs-provider - vcs-revision type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-policy-group-request.yml schema: $ref: '#/components/schemas/PolicyGroupDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-policy-group-response.yml schema: $ref: '#/components/schemas/PolicyGroupDocument' description: Successfully created. '403': description: User unauthorized to perform this action. '404': description: Relationship not found or user unauthorized to perform action. '409': description: Quota exceeded error. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Create a Policy Group tags: - policy-groups x-resource: PolicyGroup x-service: tf-api /policy-groups/{policy_group}: delete: description: | This endpoint deletes a [policy group](../../opa.html) by ID. Only an unused policy group (that is not linked to any environment) can be removed. operationId: delete_policy_group parameters: - description: The ID of the policy group to delete. in: path name: policy_group required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Deleted. '403': description: User unauthorized to perform this action. '404': description: Policy group not found or user unauthorized to perform action. '409': description: Can't be deleted. The policy group is in use. 4XX: description: Client error. 5XX: description: Server error. summary: Delete a Policy Group tags: - policy-groups x-resource: PolicyGroup x-service: tf-api get: description: Show details of a specific [policy group](../../opa.html). operationId: get_policy_group parameters: - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - policies - vcs-provider - vcs-revision type: string type: array - description: The ID of the policy group to show. in: path name: policy_group required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/PolicyGroupDocument' description: Success. '403': description: User unauthorized to perform this action. '404': description: User not authorized or policy group not found. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Policy Group tags: - policy-groups x-resource: PolicyGroup x-service: tf-api patch: description: | This endpoint updates a [policy group](../../opa.html) by ID. operationId: update_policy_group parameters: - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - policies - vcs-provider - vcs-revision type: string type: array - description: The ID of the policy group to update. in: path name: policy_group required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/PolicyGroupDocument' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/PolicyGroupDocument' description: Success. '403': description: User unauthorized to perform this action. '404': description: | Policy group or relationship not found, or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Update a Policy Group tags: - policy-groups x-resource: PolicyGroup x-service: tf-api /policy-groups/{policy_group}/relationships/environments: patch: operationId: update_policy_group_environments parameters: - description: The ID of the policy_group to update. in: path name: policy_group required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/update-policy-group-environments-request-body.yml schema: $ref: '#/components/schemas/PolicyGroupEnvironmentRelationshipFieldsetsListingDocument' responses: '204': description: Successfully updated the policy group environments relationships. '404': description: Environments or policy group not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Update policy group environments relationships tags: - policy-group-environments x-resource: PolicyGroup x-service: tf-api post: operationId: create_policy_group_environments parameters: - description: The ID of the policy_group to update. in: path name: policy_group required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-policy-group-environments-request-body.yml schema: $ref: '#/components/schemas/PolicyGroupEnvironmentRelationshipFieldsetsListingDocument' responses: '204': description: Successfully created the policy group environments relationships. '404': description: Environments or policy group not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Create policy group environments relationships tags: - policy-group-environments x-resource: PolicyGroup x-service: tf-api /policy-groups/{policy_group}/relationships/environments/{environment}: delete: operationId: delete_policy_group_environments parameters: - description: The ID of the policy group. in: path name: policy_group required: true schema: type: string - description: The ID of the environment to be unlinked from policy group. in: path name: environment required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Successfully deleted the policy group's environment relationship. '404': description: Environment or policy group not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Delete policy group's environment relationship tags: - policy-group-environments x-resource: PolicyGroup x-service: tf-api /provider-configuration-links/{provider_configuration_link}: delete: description: | The endpoint deletes a Provider configuration workspace link by ID. operationId: delete_provider_configuration_workspace_link parameters: - description: | The ID of the Provider configuration link to delete. in: path name: provider_configuration_link required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Deleted. '404': description: Provider configuration link not found or user unauthorized. '422': description: The ID of environment link is specified. 4XX: description: Client error. 5XX: description: Server error. summary: Delete a Provider configuration workspace link tags: - provider-configuration-links x-resource: ProviderConfigurationLink x-service: tf-api get: description: | Show details of a specific Proivider configuration link. operationId: get_provider_configuration_link parameters: - description: | The ID of the Provider configuration link. in: path name: provider_configuration_link required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationLinkDocument' description: Success. '404': description: Provider configuration link not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Provider configuration link tags: - provider-configuration-links x-resource: ProviderConfigurationLink x-service: tf-api patch: description: | This endpoint allows updates to attributes of an existing Provider configuration link. operationId: update_provider_configuration_link parameters: - description: | The ID of the Provider configuration link to update. in: path name: provider_configuration_link required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationLinkDocument' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationLinkDocument' description: Updated. '403': description: User unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.) or the ID of environment link is specified. 4XX: description: Client error. 5XX: description: Server error. summary: Update a Provider configuration link tags: - provider-configuration-links x-resource: ProviderConfigurationLink x-service: tf-api /provider-configuration-parameters/{provider_configuration_parameter}: delete: description: The endpoint deletes a Provider configuration parameter by ID. operationId: delete_provider_configuration_parameter parameters: - description: | The ID of the Provider configuration parameter to delete. in: path name: provider_configuration_parameter required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Deleted. '404': description: Provider configuration parameter not found or user unauthorized. 4XX: description: Client error. 5XX: description: Server error. summary: Delete a Provider configuration parameter tags: - provider-configuration-params x-resource: ProviderConfigurationParameter x-service: tf-api get: description: | Show details of a specific Proivider configuration parameter. operationId: get_provider_configuration_parameter parameters: - description: | The ID of the Provider configuration parameter. in: path name: provider_configuration_parameter required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationParameterDocument' description: Success. '404': description: Provider configuration parameter not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Provider configuration parameter tags: - provider-configuration-params x-resource: ProviderConfigurationParameter x-service: tf-api patch: description: | This endpoint allows updates to attributes of an existing Provider configuration parameters. operationId: update_provider_configuration_parameter parameters: - description: | The ID of the Provider configuration parameter to update. in: path name: provider_configuration_parameter required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationParameterDocument' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationParameterDocument' description: Updated. '403': description: User unauthorized to perform action. '404': description: Relationship resource not found, or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Update a Provider configuration parameter tags: - provider-configuration-params x-resource: ProviderConfigurationParameter x-service: tf-api /provider-configurations: get: description: | This endpoint returns a list of Provider configurations by various filters. operationId: list_provider_configurations parameters: - description: The provider configuration name filter. in: query name: filter[name] required: false schema: type: string - description: The provider configuration type filter. in: query name: filter[provider-name] required: false schema: type: string - description: The provider configuration account filter. in: query name: filter[account] required: false schema: type: string - description: The provider configuration environment filter. in: query name: filter[environment] required: false schema: type: string - description: The ID(s) of provider configuration(s). in: query name: filter[provider-configuration] required: false schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - environments - parameters type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: environments: description: The comma-separated list of fields to return in response for Environment resource. type: string provider-configuration-parameters: description: The comma-separated list of fields to return in response for ProviderConfigurationParameter resource. type: string provider-configurations: description: The comma-separated list of fields to return in response for ProviderConfiguration resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationListingDocument' description: Success. '403': description: User unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: List Provider configurations tags: - provider-configurations x-resource: ProviderConfiguration x-service: tf-api post: description: | Create a new Provider configuration. operationId: create_provider_configuration parameters: - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationDocument' responses: '201': content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationDocument' description: Created. '403': description: User unauthorized to perform action. '404': description: Relationship resource not found, or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Create a Provider configuration tags: - provider-configurations x-resource: ProviderConfiguration x-service: tf-api /provider-configurations/{provider_configuration}: delete: description: The endpoint deletes a Provider configuration by ID. operationId: delete_provider_configuration parameters: - description: The ID of the Provider configuration in: path name: provider_configuration required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Deleted. '404': description: Provider configuration not found or user unauthorized. '422': description: |- Some of environments cant be detached. The environment cant be detached if some of the environment workspaces use this provider configuration. 4XX: description: Client error. 5XX: description: Server error. summary: Delete a Provider configuration tags: - provider-configurations x-resource: ProviderConfiguration x-service: tf-api get: description: Show details of a specific Provider configuration. operationId: get_provider_configuration parameters: - description: The ID of the Provider configuration. in: path name: provider_configuration required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - environments - parameters type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationDocument' description: Success. '404': description: Provider configuration not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Provider configuration tags: - provider-configurations x-resource: ProviderConfiguration x-service: tf-api patch: description: | This endpoint allows updates to attributes of an existing Provider configuration. operationId: update_provider_configuration parameters: - description: | The ID of the Provider configuration to update. in: path name: provider_configuration required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationDocument' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationDocument' description: Updated. '403': description: User unauthorized to perform action. '404': description: Relationship resource not found, or user unauthorized to perform action. '422': description: |- Malformed request body (missing attributes, wrong types, etc.) or some of environments cant be detached. The environment cant be detached if some of the environment workspaces use this provider configuration. 4XX: description: Client error. 5XX: description: Server error. summary: Update a Provider configuration tags: - provider-configurations x-resource: ProviderConfiguration x-service: tf-api /provider-configurations/{provider_configuration}/parameters: get: description: | This endpoint returns a list of Provider configuration parameters for specific provider configuration. operationId: list_provider_configuration_parameters parameters: - description: | The ID of the Provider configuration. in: path name: provider_configuration required: true schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationParameterListingDocument' description: Success. '403': description: User unauthorized to perform action. '404': description: Provider configuration not found. 4XX: description: Client error. 5XX: description: Server error. summary: List Provider configuration parameters for specific provider configurations tags: - provider-configuration-params x-resource: ProviderConfigurationParameter x-service: tf-api post: description: | Create a new Provider configuration parameter. operationId: create_provider_configuration_parameter parameters: - description: | The ID of the Provider configuration. in: path name: provider_configuration required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationParameterDocument' responses: '201': content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationParameterDocument' description: Created. '403': description: User unauthorized to perform action. '404': description: Provider configuration not found. '422': description: Malformed request body (missing attributes, wrong types, etc.) or parameter cant be created for this provider. 4XX: description: Client error. 5XX: description: Server error. summary: Create a Provider configuration parameter tags: - provider-configuration-params x-resource: ProviderConfigurationParameter x-service: tf-api /reports/module-namespaces: get: description: This endpoint lists unique terraform module usage namespaces. operationId: list_module_usage_namespaces parameters: - description: The search string. Supports search by module source, namespace name or ID. in: query name: query required: false schema: type: string - description: The ID of the module usage namespace. in: query name: filter[tf-module-namespace] required: false schema: type: string - description: Page number. in: query name: page[number] required: false schema: type: string - description: Page size. in: query name: page[size] required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - namespace-name type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: accounts: description: The comma-separated list of fields to return in response for Account resource. type: string environments: description: The comma-separated list of fields to return in response for Environment resource. type: string tf-module-namespaces: description: The comma-separated list of fields to return in response for ModuleUsageNamespace resource. type: string type: object style: deepObject - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - namespace-account - namespace-environment type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/ModuleUsageNamespaceListingDocument' description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List terraform module usage namespaces tags: - terraform-module-usage x-resource: ModuleUsageNamespace x-service: tf-api /reports/module-sources: get: description: This endpoint lists unique terraform module sources. operationId: list_terraform_module_sources parameters: - description: The search string. Supports search by module source. in: query name: query required: false schema: type: string - description: Page number. in: query name: page[number] required: false schema: type: string - description: Page size. in: query name: page[size] required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/json: schema: $ref: '#/components/schemas/TerraformModuleUsageSourceFieldsetsListingDocument' description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List terraform module sources tags: - terraform-module-usage x-resource: TerraformModuleUsage x-service: tf-api /reports/module-usage: get: description: This endpoint lists terraform module usage. operationId: list_terraform_module_usage parameters: - description: The search string. Supports search by workspace name. in: query name: query required: false schema: type: string - description: Page number. in: query name: page[number] required: false schema: type: string - description: Page size. in: query name: page[size] required: false schema: type: string - description: Filter by terraform module usage. in: query name: filter[tf-module-usage] required: true schema: type: string - description: The environment ID to list modules usage for. in: query name: filter[environment] required: false schema: type: string - description: Filter modules usage by version. in: query name: filter[version] required: false schema: type: string - description: Format of the response. It can be 'json' or 'csv'. in: query name: format required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - created-at - environment - version - workspace type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: environments: description: The comma-separated list of fields to return in response for Environment resource. type: string tf-module-version-usages: description: The comma-separated list of fields to return in response for TerraformModuleVersionUsage resource. type: string workspaces: description: The comma-separated list of fields to return in response for Workspace resource. type: string type: object style: deepObject - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - environment - workspace type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/TerraformModuleVersionUsageListingDocument' text/csv: schema: format: csv type: string description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List terraform module usage tags: - terraform-module-versions-usage x-resource: TerraformModuleVersionUsage x-service: tf-api /reports/module-versions-usage: get: description: This endpoint lists unique terraform module versions. operationId: list_terraform_module_versions_usage parameters: - description: Filter by terraform module usage. in: query name: filter[tf-module-usage] required: true schema: type: string - description: Filter by module version. in: query name: filter[version] required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/json: schema: $ref: '#/components/schemas/TerraformModuleUsageVersionFieldsetsListingDocument' description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List unique terraform module versions tags: - terraform-module-versions-usage x-resource: TerraformModuleVersionUsage x-service: tf-api /reports/modules: get: description: This endpoint lists terraform module usages. operationId: list_terraform_module_usages parameters: - description: The search string. Supports search by module name or parent module name. in: query name: query required: false schema: type: string - description: Page number. in: query name: page[number] required: false schema: type: string - description: Page size. in: query name: page[size] required: false schema: type: string - description: The namespace ID to list modules for. in: query name: filter[tf-module-namespace] required: false schema: type: string - description: Filter modules by source. in: query name: filter[source] required: false schema: type: string - description: Format of the response. It can be 'json' or 'csv'. in: query name: format required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - module - namespace - parent-module - source - versions-used-count - workspaces-count type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: accounts: description: The comma-separated list of fields to return in response for Account resource. type: string environments: description: The comma-separated list of fields to return in response for Environment resource. type: string tf-module-namespaces: description: The comma-separated list of fields to return in response for ModuleUsageNamespace resource. type: string type: object style: deepObject - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - namespace type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/TerraformModuleUsageListingDocument' text/csv: schema: format: csv type: string description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List terraform module usages tags: - terraform-module-usage x-resource: TerraformModuleUsage x-service: tf-api /reports/modules/{module_usage}: get: description: This endpoint returns instance of module usage. operationId: get_module_usage parameters: - description: The ID of the module usage instance. in: path name: module_usage required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - namespace type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: tf-module-namespaces: description: The comma-separated list of fields to return in response for ModuleUsageNamespace resource. type: string tf-module-usages: description: The comma-separated list of fields to return in response for TerraformModuleUsage resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/TerraformModuleUsageDocument' description: Success. '403': description: User unauthorized to perform this action. '404': description: Module usage not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get module usage tags: - terraform-module-usage x-resource: TerraformModuleUsage x-service: tf-api /reports/provider-sources: get: description: This endpoint lists unique terraform provider sources. operationId: list_terraform_provider_sources parameters: - description: Query string in: query name: query required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/json: schema: $ref: '#/components/schemas/TerraformProviderUsageSourceFieldsetsListingDocument' description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List unique terraform provider sources tags: - terraform-provider-usage x-resource: TerraformProviderUsage x-service: tf-api /reports/provider-usage: get: description: This endpoint lists terraform provider version usages. operationId: list_terraform_provider_usage parameters: - description: The search string. Supports search by workspace name. in: query name: query required: false schema: type: string - description: Page number. in: query name: page[number] required: false schema: type: string - description: Page size. in: query name: page[size] required: false schema: type: string - description: Filter by terraform provider usage. in: query name: filter[tf-provider-usage] required: true schema: type: string - description: The environment ID to list providers usage for. in: query name: filter[environment] required: false schema: type: string - description: Filter providers usage by version. in: query name: filter[version] required: false schema: type: string - description: Format of the response. It can be 'json' or 'csv'. in: query name: format required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - created-at - environment - version - workspace type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: environments: description: The comma-separated list of fields to return in response for Environment resource. type: string tf-provider-version-usages: description: The comma-separated list of fields to return in response for TerraformProviderVersionUsage resource. type: string workspaces: description: The comma-separated list of fields to return in response for Workspace resource. type: string type: object style: deepObject - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - environment - workspace type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/TerraformProviderVersionUsageListingDocument' text/csv: schema: format: csv type: string description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List terraform provider version usages tags: - terraform-provider-version-usage x-resource: TerraformProviderVersionUsage x-service: tf-api /reports/provider-versions-usage: get: description: This endpoint lists unique terraform provider versions. operationId: list_terraform_provider_versions_usage parameters: - description: Filter by terraform provider usage. in: query name: filter[tf-provider-usage] required: true schema: type: string - description: Query string in: query name: query required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/json: schema: $ref: '#/components/schemas/TerraformProviderUsageVersionFieldsetsListingDocument' description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List unique terraform provider versions tags: - terraform-provider-version-usage x-resource: TerraformProviderVersionUsage x-service: tf-api /reports/providers: get: description: This endpoint lists terraform provider usages. operationId: list_terraform_provider_usages parameters: - description: Page number. in: query name: page[number] required: false schema: type: string - description: Page size. in: query name: page[size] required: false schema: type: string - description: Filter providers by source. in: query name: filter[source] required: false schema: type: string - description: Format of the response. It can be 'json' or 'csv'. in: query name: format required: false schema: type: string - description: Query string in: query name: query required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - provider - source - versions-used-count - workspaces-count type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: tf-provider-usages: description: The comma-separated list of fields to return in response for TerraformProviderUsage resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/TerraformProviderUsageListingDocument' text/csv: schema: format: csv type: string description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List terraform provider usages tags: - terraform-provider-usage x-resource: TerraformProviderUsage x-service: tf-api /reports/providers/{provider_usage}: get: description: This endpoint returns instance of provider usage. operationId: get_provider_usage parameters: - description: The ID of the provider usage instance. in: path name: provider_usage required: true schema: type: string - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: tf-provider-usages: description: The comma-separated list of fields to return in response for TerraformProviderUsage resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/TerraformProviderUsageDocument' description: Success. '403': description: User unauthorized to perform this action. '404': description: Provider usage not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get provider usage tags: - terraform-provider-usage x-resource: TerraformProviderUsage x-service: tf-api /reports/resource-providers: get: description: This endpoint lists unique terraform resource provider types. operationId: list_terraform_resource_providers parameters: - description: Query string in: query name: query required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/json: schema: $ref: '#/components/schemas/TerraformResourceUsageProviderTypeFieldsetsListingDocument' description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List unique terraform resource provider types tags: - terraform-resource-usage x-resource: TerraformResourceUsage x-service: tf-api /reports/resource-usage: get: description: This endpoint lists terraform resource instances usage. operationId: list_terraform_resource_instances_usage parameters: - description: The search string. Supports search by external id or resource address. in: query name: query required: false schema: type: string - description: Page number. in: query name: page[number] required: false schema: type: string - description: Page size. in: query name: page[size] required: false schema: type: string - description: Filter by terraform resource usage. in: query name: filter[tf-resource-usage] required: true schema: type: string - description: Filter by terraform resource usage status. in: query name: filter[is-active] required: false schema: type: string - description: Filter duplicate resources usage. in: query name: filter[is-duplicate] required: false schema: type: string - description: Format of the response. It can be 'json' or 'csv'. in: query name: format required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - is-active - name - updated-at type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: environments: description: The comma-separated list of fields to return in response for Environment resource. type: string runs: description: The comma-separated list of fields to return in response for Run resource. type: string state-versions: description: The comma-separated list of fields to return in response for StateVersion resource. type: string tf-resource-instance-usages: description: The comma-separated list of fields to return in response for TerraformResourceInstanceUsage resource. type: string workspaces: description: The comma-separated list of fields to return in response for Workspace resource. type: string type: object style: deepObject - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - environment - run - state-version - workspace type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/TerraformResourceInstanceUsageListingDocument' text/csv: schema: format: csv type: string description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List terraform resource instances usage tags: - terraform-resource-instances-usage x-resource: TerraformResourceInstanceUsage x-service: tf-api /reports/resources: get: description: This endpoint lists terraform resource usages. operationId: list_terraform_resource_usages parameters: - description: The search string. Supports search by resource name. in: query name: query required: false schema: type: string - description: Page number. in: query name: page[number] required: false schema: type: string - description: Page size. in: query name: page[size] required: false schema: type: string - description: Filter resources by provider type. in: query name: filter[provider-type] required: false schema: type: string - description: Format of the response. It can be 'json' or 'csv'. in: query name: format required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - name type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: tf-resource-usages: description: The comma-separated list of fields to return in response for TerraformResourceUsage resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/TerraformResourceUsageListingDocument' text/csv: schema: format: csv type: string description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List terraform resource usages tags: - terraform-resource-usage x-resource: TerraformResourceUsage x-service: tf-api /reports/resources/{resource_usage}: get: description: This endpoint returns instance of resource usage. operationId: get_resource_usage parameters: - description: The ID of the resource usage instance. in: path name: resource_usage required: true schema: type: string - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: tf-resource-usages: description: The comma-separated list of fields to return in response for TerraformResourceUsage resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/TerraformResourceUsageDocument' description: Success. '403': description: User unauthorized to perform this action. '404': description: Resource usage not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get resource usage tags: - terraform-resource-usage x-resource: TerraformResourceUsage x-service: tf-api /reports/tf-versions-usage: get: description: This endpoint lists terraform versions usage. operationId: list_terraform_versions_usage parameters: - description: The search string. Supports search by workspace name of terraform version usage. in: query name: query required: false schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The account ID to list terraform versions usage for. in: query name: filter[account] required: true schema: type: string - description: The environment ID to list terraform versions usage for. in: query name: filter[environment] required: false schema: type: string - description: Filter terraform versions usage by version. in: query name: filter[version] required: false schema: type: string - description: Format of the response. It can be 'json' or 'csv'. in: query name: format required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - created-at - environment - version - workspace type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: accounts: description: The comma-separated list of fields to return in response for Account resource. type: string environments: description: The comma-separated list of fields to return in response for Environment resource. type: string tf-version-usages: description: The comma-separated list of fields to return in response for TerraformVersionUsage resource. type: string workspaces: description: The comma-separated list of fields to return in response for Workspace resource. type: string type: object style: deepObject - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - environment - workspace type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/TerraformVersionUsageListingDocument' text/csv: schema: format: csv type: string description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List terraform versions usage tags: - terraform-version-usage x-resource: TerraformVersionUsage x-service: tf-api /reports/tf-versions-usage-versions: get: description: This endpoint lists unique terraform versions in use. operationId: list_terraform_versions_usage_versions parameters: - description: Query string. in: query name: query required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/json: schema: $ref: '#/components/schemas/TerraformVersionUsageVersionFieldsetsListingDocument' description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List unique terraform versions in use tags: - terraform-version-usage x-resource: TerraformVersionUsage x-service: tf-api /roles: get: description: | This endpoint returns a list of [IAM](https://docs.scalr.io/docs/identity-and-access-management) roles. operationId: get_roles parameters: - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The account filter. in: query name: filter[account] required: false schema: type: string - description: The role filter. in: query name: filter[role] required: false schema: type: string - description: The role name filter. in: query name: filter[name] required: false schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - permissions type: string type: array - description: Query string in: query name: query required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/RoleListingDocument' description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List Roles tags: - roles x-resource: Role x-service: tf-api post: description: Create a new [IAM](https://docs.scalr.io/docs/identity-and-access-management) role. operationId: create_role parameters: - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - permissions type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-role-request.yml schema: $ref: '#/components/schemas/RoleDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-role-response.yml schema: $ref: '#/components/schemas/RoleDocument' description: Successfully created. '403': description: User unauthorized to perform this action. '404': description: Account not found or user unauthorized. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Create a Role tags: - roles x-resource: Role x-service: tf-api /roles/{role}: delete: description: The endpoint deletes [IAM](https://docs.scalr.io/docs/identity-and-access-management) role by ID. operationId: delete_role parameters: - in: path name: role required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Successfully deleted. '403': description: User unauthorized to perform this action. '404': description: Role not found. '409': description: Conflict; check the error object for more information. 4XX: description: Client error. 5XX: description: Server error. summary: Delete a Role tags: - roles x-resource: Role x-service: tf-api get: description: The endpoint returns an [IAM](https://docs.scalr.io/docs/identity-and-access-management) role by ID. operationId: get_role parameters: - description: The ID of the role. in: path name: role required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - permissions type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/RoleDocument' description: Success. '403': description: User unauthorized to perform this action. '404': description: Role not found. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Role tags: - roles x-resource: Role x-service: tf-api patch: description: This endpoint updates [IAM](https://docs.scalr.io/docs/identity-and-access-management) role by ID. operationId: update_role parameters: - description: The ID of the role to update. in: path name: role required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - permissions type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/RoleDocument' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/RoleDocument' description: Successfully updated. '403': description: User unauthorized to perform this action. '404': description: Role not found. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Update a Role tags: - roles x-resource: Role x-service: tf-api /run-triggers: post: description: |- Create a new run trigger. In order to create a run trigger, the user must have `workspaces:read` permission for the upstream workspace and permissions `workspaces:update` and `runs:create` for the downstream workspace. operationId: create_run_trigger parameters: - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/RunTriggerDocument' responses: '201': content: application/vnd.api+json: schema: $ref: '#/components/schemas/RunTriggerDocument' description: Successfully created a run trigger. '403': description: Missing required permissions. '404': description: Relationship not found, or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.) 4XX: description: Client error. 5XX: description: Server error. summary: Create a Run Trigger. tags: - run-triggers x-resource: RunTrigger x-service: tf-api /run-triggers/{run_trigger}: delete: operationId: delete_run_trigger parameters: - description: The ID of the run trigger to delete. in: path name: run_trigger required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Run trigger deleted. '404': description: Run trigger not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Delete a Run Trigger tags: - run-triggers x-resource: RunTrigger x-service: tf-api get: description: | Show details of a specific trigger. operationId: get_run_trigger parameters: - description: The ID of the run trigger to show. in: path name: run_trigger required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - downstream - upstream type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/RunTriggerDocument' description: Request was successful. '404': description: Run trigger not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Run Trigger tags: - run-triggers x-resource: RunTrigger x-service: tf-api /runs: get: description: This endpoint lists runs for a specific workspace. operationId: get_runs parameters: - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - apply - configuration-version - cost-estimate - created-by - created-by-run - environment - plan - policy-checks - status-transitions - tags - vcs-revision - workspace type: string type: array - description: The workspace ID to list runs for. in: query name: filter[workspace] required: false schema: type: string - description: The account ID to list runs for. in: query name: filter[account] required: false schema: type: string - description: The environment ID to list runs for. in: query name: filter[environment] required: false schema: type: string - description: The comma-separated list of run IDs. in: query name: filter[run] required: false schema: type: string - description: The run status filter. in: query name: filter[status] required: false schema: type: string - description: The run source filter. in: query name: filter[source] required: false schema: type: string - description: Commit sha that affected runs in: query name: filter[vcs-revision] required: false schema: type: string - description: The ID of the User who triggered this run in: query name: filter[created-by] required: false schema: type: string - description: The ID of the Run which triggered this run in: query name: filter[created-by-run] required: false schema: type: string - description: The run created at filter. in: query name: filter[created-at] required: false schema: type: string - description: Query string in: query name: query required: false schema: type: string - description: The is dry runs filter. in: query name: filter[is-dry] required: false schema: type: string - description: List only runs that are scheduled. in: query name: scheduled required: false schema: type: string - description: Filter runs by tags. in: query name: filter[tag] required: false schema: type: string - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: applies: description: The comma-separated list of fields to return in response for Apply resource. type: string configuration-versions: description: The comma-separated list of fields to return in response for ConfigurationVersion resource. type: string cost-estimates: description: The comma-separated list of fields to return in response for CostEstimate resource. type: string environments: description: The comma-separated list of fields to return in response for Environment resource. type: string plans: description: The comma-separated list of fields to return in response for Plan resource. type: string policy-checks: description: The comma-separated list of fields to return in response for PolicyCheck resource. type: string runs: description: The comma-separated list of fields to return in response for Run resource. type: string status-transitions: description: The comma-separated list of fields to return in response for StatusTransition resource. type: string tags: description: The comma-separated list of fields to return in response for Tag resource. type: string users: description: The comma-separated list of fields to return in response for User resource. type: string vcs-revisions: description: The comma-separated list of fields to return in response for VcsRevision resource. type: string workspaces: description: The comma-separated list of fields to return in response for Workspace resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-runs.yml schema: $ref: '#/components/schemas/RunListingDocument' description: Success. '404': description: Workspace not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: List Runs tags: - runs x-resource: Run x-service: tf-api post: description: | A run performs terraform plan and apply using a configuration version and the workspace's current variables. If the configuration version is omitted, the run will be created using the workspace's latest configuration version. If you want to create a dry run, specify `is-dry: true` or reference configuration version with `is-dry: true` in the relationships. operationId: create_run parameters: - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-run-request.yml schema: $ref: '#/components/schemas/RunDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-run-response.yml schema: $ref: '#/components/schemas/RunDocument' description: Successfully created a run. '404': description: Environment or workspace not found, or user unauthorized to perform action. '422': description: Invalid attributes. 4XX: description: Client error. 5XX: description: Server error. summary: Create a Run tags: - runs x-resource: Run x-service: tf-api /runs-queue: get: description: | This endpoint lists Runs Queue on allowed scopes. operationId: get_runs_queue parameters: - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - apply - configuration-version - cost-estimate - created-by - created-by-run - environment - plan - policy-checks - status-transitions - tags - vcs-revision - workspace type: string type: array - description: The workspace ID to list runs for. in: query name: filter[workspace] required: false schema: type: string - description: The account ID to list runs for. in: query name: filter[account] required: false schema: type: string - description: The environment ID to list runs for. in: query name: filter[environment] required: false schema: type: string - description: The comma-separated list of run IDs. in: query name: filter[run] required: false schema: type: string - description: The run status filter. in: query name: filter[status] required: false schema: type: string - description: The run source filter. in: query name: filter[source] required: false schema: type: string - description: Commit sha that affected runs in: query name: filter[vcs-revision] required: false schema: type: string - description: The ID of the User who triggered this run in: query name: filter[created-by] required: false schema: type: string - description: The ID of the Run which triggered this run in: query name: filter[created-by-run] required: false schema: type: string - description: The run created at filter. in: query name: filter[created-at] required: false schema: type: string - description: Query string in: query name: query required: false schema: type: string - description: The is dry runs filter. in: query name: filter[is-dry] required: false schema: type: string - description: List only runs that are scheduled. in: query name: scheduled required: false schema: type: string - description: Filter runs by tags. in: query name: filter[tag] required: false schema: type: string - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: applies: description: The comma-separated list of fields to return in response for Apply resource. type: string configuration-versions: description: The comma-separated list of fields to return in response for ConfigurationVersion resource. type: string cost-estimates: description: The comma-separated list of fields to return in response for CostEstimate resource. type: string environments: description: The comma-separated list of fields to return in response for Environment resource. type: string plans: description: The comma-separated list of fields to return in response for Plan resource. type: string policy-checks: description: The comma-separated list of fields to return in response for PolicyCheck resource. type: string runs: description: The comma-separated list of fields to return in response for Run resource. type: string status-transitions: description: The comma-separated list of fields to return in response for StatusTransition resource. type: string tags: description: The comma-separated list of fields to return in response for Tag resource. type: string users: description: The comma-separated list of fields to return in response for User resource. type: string vcs-revisions: description: The comma-separated list of fields to return in response for VcsRevision resource. type: string workspaces: description: The comma-separated list of fields to return in response for Workspace resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-runs.yml schema: $ref: '#/components/schemas/RunListingDocument' description: Success. '404': description: User unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: List Runs Queue tags: - runs x-resource: Run x-service: tf-api /runs/{run}: get: description: Show details of a specific run. operationId: get_run parameters: - description: The ID of the run to show. example: run-t61gbtqgg8553h8 in: path name: run required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - apply - configuration-version - cost-estimate - created-by - created-by-run - environment - plan - policy-checks - status-transitions - tags - vcs-revision - workspace type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: applies: description: The comma-separated list of fields to return in response for Apply resource. type: string configuration-versions: description: The comma-separated list of fields to return in response for ConfigurationVersion resource. type: string cost-estimates: description: The comma-separated list of fields to return in response for CostEstimate resource. type: string environments: description: The comma-separated list of fields to return in response for Environment resource. type: string plans: description: The comma-separated list of fields to return in response for Plan resource. type: string policy-checks: description: The comma-separated list of fields to return in response for PolicyCheck resource. type: string runs: description: The comma-separated list of fields to return in response for Run resource. type: string status-transitions: description: The comma-separated list of fields to return in response for StatusTransition resource. type: string tags: description: The comma-separated list of fields to return in response for Tag resource. type: string users: description: The comma-separated list of fields to return in response for User resource. type: string vcs-revisions: description: The comma-separated list of fields to return in response for VcsRevision resource. type: string workspaces: description: The comma-separated list of fields to return in response for Workspace resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-run.yml schema: $ref: '#/components/schemas/RunDocument' description: Success. '404': description: Run not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Run tags: - runs x-resource: Run x-service: tf-api /runs/{run}/actions/apply: post: description: |- Apply a run that is paused waiting for confirmation after a plan. This includes runs in the `planned` and `policy_checked` states. This action is only required for runs that can't be auto-applied. operationId: confirm_run parameters: - description: The ID of the run to confirm. in: path name: run required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/json: examples: default: $ref: examples/apply-run-request.yml schema: $ref: '#/components/schemas/ConfirmRequest' responses: '202': description: Successfully queued an apply request. '404': description: Run not found, or user unauthorized to perform action. '409': description: Run was not paused for confirmation. Apply not allowed. 4XX: description: Client error. 5XX: description: Server error. summary: Apply a Run tags: - runs x-resource: Run x-service: tf-api /runs/{run}/actions/cancel: post: description: |- Interrupt a run that is currently planning or applying. Performing a cancel is roughly equivalent to hitting `ctrl+c` during a Terraform plan or apply on the CLI. The running Terraform process is sent an `INT` signal, which instructs Terraform to end its work and wrap up in the safest way possible. operationId: cancel_run parameters: - description: The ID of the run to cancel. in: path name: run required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/json: schema: $ref: '#/components/schemas/Comment' responses: '202': description: Successfully queued a cancel request. '204': description: Run is already cancelled, nothing should be done. '404': description: Run not found, or user unauthorized to perform action. '409': description: Run was not planning or applying. Cancel not allowed. 4XX: description: Client error. 5XX: description: Server error. summary: Cancel a Run tags: - runs x-resource: Run x-service: tf-api /runs/{run}/actions/discard: post: description: |- Skip any remaining work on runs that are paused waiting for confirmation or priority. This includes runs in the `pending`, `planned`, `policy_checked` and `policy_override` states. operationId: discard_run parameters: - description: The ID of run to discard. in: path name: run required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/json: schema: $ref: '#/components/schemas/Comment' responses: '202': description: Successfully queued a discard request. '404': description: Run not found, or user unauthorized to perform action. '409': description: Run was not paused for confirmation or priority. Discard not allowed. 4XX: description: Client error. 5XX: description: Server error. summary: Discard a Run tags: - runs x-resource: Run x-service: tf-api /runs/{run}/actions/force: post: description: | Cancel all previous runs in pending or waiting for confirmation statuses. operationId: force_run parameters: - description: The ID of the run to force. in: path name: run required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/json: schema: $ref: '#/components/schemas/Comment' responses: '202': description: Successfully forced a run. '404': description: Run not found, or user unauthorized to perform action. '409': description: Workspace force_latest_run enabled or status is not pending. Force not allowed. 4XX: description: Client error. 5XX: description: Server error. summary: Force Run tags: - runs x-resource: Run x-service: tf-api /runs/{run}/policy-checks: get: description: List policy checks for a specific run. operationId: list_policy_checks parameters: - description: The ID of the run. example: run-t61g5rlk9qbudh0 in: path name: run required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-policy-checks.yml schema: $ref: '#/components/schemas/PolicyCheckListingDocument' description: Success. '403': description: Plan not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: List Policy Checks tags: - policy-checks x-resource: PolicyCheck x-service: tf-api /runs/{run}/policy-input: get: description: |- Get a Zip archive with policy check input data generated for a given run. See [Policy Input](https://docs.scalr.io/docs/policy-as-code) data structure. operationId: download_policy_input parameters: - description: The ID of the run. in: path name: run required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': description: Successfully generated input archive. '404': description: Run was not found, plan wasn't completed or user unauthorized to perform the action. 4XX: description: Client error. 5XX: description: Server error. summary: Download a Policy Input tags: - runs x-resource: Run x-service: tf-api /service-accounts: get: description: | This endpoint returns a list of [IAM](https://docs.scalr.io/docs/identity-and-access-management) service accounts. operationId: get_service_accounts parameters: - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The account filter. in: query name: filter[account] required: false schema: type: string - description: The service account filter. in: query name: filter[service-account] required: false schema: type: string - description: The service account email filter. in: query name: filter[email] required: false schema: type: string - description: The service account owner filter. in: query name: filter[owner] required: false schema: type: string - description: Show service accounts owned by me. in: query name: filter[owned-by-me] required: false schema: type: string - description: Filter service accounts with/without owners. in: query name: filter[has-owners] required: false schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - created-by type: string type: array - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - description - email - name - status type: string type: array - description: Query string in: query name: query required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/list-service-accounts.yml schema: $ref: '#/components/schemas/ServiceAccountListingDocument' description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List Service Accounts tags: - service_accounts x-resource: ServiceAccount x-service: tf-api post: description: | Create a new [IAM](https://docs.scalr.io/docs/identity-and-access-management) service account. operationId: create_service_account parameters: - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - created-by type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-service-account-request.yml schema: $ref: '#/components/schemas/ServiceAccountDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-service-account-response.yml schema: $ref: '#/components/schemas/ServiceAccountDocument' description: Successfully created. '403': description: User unauthorized to perform this action or service accounts functionality is not enabled for this account. '404': description: Relationship not found or user unauthorized. '409': description: User quota exceeded. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Create a Service Account tags: - service_accounts x-resource: ServiceAccount x-service: tf-api /service-accounts/{service_account}: delete: description: The endpoint deletes [IAM](https://docs.scalr.io/docs/identity-and-access-management) service account by ID. operationId: delete_service_account parameters: - description: The ID of the service account to delete. in: path name: service_account required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Successfully deleted. '403': description: User unauthorized to perform this action. '404': description: Service account not found. 4XX: description: Client error. 5XX: description: Server error. summary: Delete a Service Account tags: - service_accounts x-resource: ServiceAccount x-service: tf-api get: description: This endpoint returns an [IAM](https://docs.scalr.io/docs/identity-and-access-management) service account by ID. operationId: get_service_account parameters: - description: | The ID of the service account. in: path name: service_account required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - created-by type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-service-account.yml schema: $ref: '#/components/schemas/ServiceAccountDocument' description: Success. '403': description: User unauthorized to perform this action. '404': description: Service account not found. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Service Account tags: - service_accounts x-resource: ServiceAccount x-service: tf-api patch: description: | This endpoint updates [IAM](https://docs.scalr.io/docs/identity-and-access-management) service account by ID. operationId: update_service_account parameters: - description: | The ID of the service account to update. in: path name: service_account required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - created-by type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/update-service-account-request.yml schema: $ref: '#/components/schemas/ServiceAccountDocument' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/update-service-account-response.yml schema: $ref: '#/components/schemas/ServiceAccountDocument' description: Successfully updated. '403': description: User unauthorized to perform this action. '404': description: Service account not found. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Update a Service Account tags: - service_accounts x-resource: ServiceAccount x-service: tf-api /service-accounts/{service_account}/access-tokens: get: description: This endpoint lists service account's access tokens. operationId: list_service_account_access_tokens parameters: - description: The ID of the service account to list tokens for. in: path name: service_account required: true schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - created-at - description - last-used-at type: string type: array - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - created-by type: string type: array - description: Query string in: query name: query required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/AccessTokenListingDocument' description: Success. '404': description: Service account not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: List access tokens of a service account tags: - access-tokens x-resource: AccessToken x-service: tf-api post: description: This endpoint creates service account's access token. operationId: create_service_account_token parameters: - description: The ID of the service account to create a token for. in: path name: service_account required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - created-by type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-service-account-token-request.yml schema: $ref: '#/components/schemas/AccessTokenDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-service-account-token-response.yml schema: $ref: '#/components/schemas/AccessTokenDocument' description: Successfully created. '404': description: Service account not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Create access token for service account tags: - access-tokens x-resource: AccessToken x-service: tf-api /software-versions: get: description: | This endpoint returns a list of software versions. operationId: list_software_versions parameters: - description: The search string. Supports search by version or image of software version. in: query name: query required: false schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: Filter software versions by id. in: query name: filter[software-version] required: false schema: type: string - description: Filter software versions by status. in: query name: filter[status] required: false schema: type: string - description: Filter software versions by deprecation flag. in: query name: filter[deprecated] required: false schema: type: string - description: Filter software versions by latest. in: query name: filter[latest] required: false schema: type: string - description: Filter software versions by software type. in: query name: filter[software-type] required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - status - version type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: software-versions: description: The comma-separated list of fields to return in response for SoftwareVersion resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/SoftwareVersionListingDocument' description: Success. 4XX: description: Client error. 5XX: description: Server error. summary: List software versions tags: - software-versions x-resource: SoftwareVersion x-service: tf-api /software-versions/{software_version}: get: description: Show details of a specific software version. operationId: get_software_version parameters: - description: The software version ID to show. in: path name: software_version required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/SoftwareVersionDocument' description: Success. '404': description: SoftwareVersion not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Software Version tags: - software-versions x-resource: SoftwareVersion x-service: tf-api /state-versions: get: operationId: list_state_versions parameters: - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - in: query name: filter[workspace] required: true schema: type: string - in: query name: filter[run] required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - created-at type: string type: array - description: Query string in: query name: query required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/StateVersionListingDocument' description: Success '404': description: Workspace not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: List Workspace's State Versions tags: - state-versions x-resource: StateVersion x-service: tf-api post: description: Create a state version and set it as the current state version for the given workspace. operationId: create_state_version parameters: - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/StateVersionDocument' responses: '201': content: application/vnd.api+json: schema: $ref: '#/components/schemas/StateVersionDocument' description: Successfully created a state version '404': description: |- Workspace not found, workspace does not have a current state version, or user unauthorized to perform action. '409': description: Conflict; check the error object for more information. '412': description: Precondition failed; check the error object for more information. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Create a State Version tags: - state-versions x-resource: StateVersion x-service: tf-api /state-versions/{state_version}: get: description: Show details of a specific state version. operationId: get_state_version parameters: - description: The ID of the state version. in: path name: state_version required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/StateVersionDocument' description: Success. '404': description: State version not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a State Version tags: - state-versions x-resource: StateVersion x-service: tf-api /state-versions/{state_version}/download: get: description: Download the `terraform.tfstate` operationId: get_state_version_download parameters: - description: The ID of the state version. in: path name: state_version required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': description: '' '302': description: The location of the temporary download link. '404': description: State version not found or user unauthorized to perform action. '422': description: The state version is not uploaded yet. 4XX: description: Client error. 5XX: description: Server error. summary: Download State Version tags: - state-versions x-resource: StateVersion x-service: tf-api /tags: get: description: | This endpoint returns a list of tags. operationId: list_tags parameters: - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The account filter in: query name: filter[account] required: false schema: type: string - description: The resource type filter in: query name: filter[resource-type] required: false schema: type: string - description: The tag name filter in: query name: filter[name] required: false schema: type: string - description: The ID(s) of tag(s). in: query name: filter[tag] required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - name type: string type: array - description: Query string in: query name: query required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/list-tags-response.yml schema: $ref: '#/components/schemas/TagListingDocument' description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List Tags tags: - tags x-resource: Tag x-service: tf-api post: description: | Create a new tag in the account. operationId: create_tag parameters: - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-tag-request.yml schema: $ref: '#/components/schemas/TagDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-tag-response.yml schema: $ref: '#/components/schemas/TagDocument' description: Successfully created. '403': description: User unauthorized to perform this action. '404': description: Relationship not found or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Create a Tag tags: - tags x-resource: Tag x-service: tf-api /tags/{tag}: delete: description: The endpoint deletes tag by ID. operationId: delete_tag parameters: - description: The ID of the tag to delete. in: path name: tag required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Successfully deleted. '403': description: User unauthorized to perform this action. '404': description: Tag not found. 4XX: description: Client error. 5XX: description: Server error. summary: Delete a Tag tags: - tags x-resource: Tag x-service: tf-api get: description: Show details of a specific tag. operationId: get_tag parameters: - description: | The ID of the tag to show. in: path name: tag required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/create-tag-response.yml schema: $ref: '#/components/schemas/TagDocument' description: Success. '403': description: User unauthorized to perform this action. '404': description: Relationship not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Tag tags: - tags x-resource: Tag x-service: tf-api patch: description: This endpoint updates tag by ID. operationId: update_tag parameters: - description: | The ID of the tag to update. in: path name: tag required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/update-tag-request.yml schema: $ref: '#/components/schemas/TagDocument' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/TagDocument' description: Successfully updated. '403': description: User unauthorized to perform this action. '404': description: Tag not found. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Update a Tag tags: - tags x-resource: Tag x-service: tf-api /teams: get: description: | The endpoint returns a list of [IAM](https://docs.scalr.io/docs/identity-and-access-management) teams. The endpoint supports filtering by team name (`filter[name]`), IdP (`filter[identity-provider]`) and team ID (`filter[team]=in:team-123,team-331`). operationId: get_teams parameters: - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The team name filter. in: query name: filter[name] required: false schema: type: string - description: The identity provider filter. in: query name: filter[identity-provider] required: false schema: type: string - description: The team filter. in: query name: filter[team] required: false schema: type: string - description: The user filter. in: query name: filter[user] required: false schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - identity-provider - users type: string type: array - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - identity-provider - name type: string type: array - description: Query string in: query name: query required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/list-teams.yml schema: $ref: '#/components/schemas/TeamListingDocument' description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List Teams tags: - teams x-resource: Team x-service: tf-api post: description: | The endpoint creates an [IAM](https://docs.scalr.io/docs/identity-and-access-management) team. If an external IdP used, the team name must exist in that IdP. operationId: create_team parameters: - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - identity-provider - users type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-team-request.yml schema: $ref: '#/components/schemas/TeamDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-team-response.yml schema: $ref: '#/components/schemas/TeamDocument' description: Successfully created. '403': description: User unauthorized to perform this action. '404': description: Relationship not found or user is not authorized to read it. '409': description: Quota exceeded error. '422': description: Malformed request body (missing attributes, wrong types, etc.) 4XX: description: Client error. 5XX: description: Server error. summary: Create a Team tags: - teams x-resource: Team x-service: tf-api /teams/{team}: delete: description: The endpoint deletes [IAM](https://docs.scalr.io/docs/identity-and-access-management) team by ID. operationId: delete_team parameters: - in: path name: team required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Successfully deleted. '403': description: User unauthorized to perform this action. '404': description: Team not found. 4XX: description: Client error. 5XX: description: Server error. summary: Delete a Team tags: - teams x-resource: Team x-service: tf-api get: description: | This endpoint returns an [IAM](https://docs.scalr.io/docs/identity-and-access-management) team by ID. operationId: get_team parameters: - description: | The ID of the team. in: path name: team required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - identity-provider - users type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-team.yml schema: $ref: '#/components/schemas/TeamDocument' description: Success. '403': description: User unauthorized to perform this action. '404': description: Team not found. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Team tags: - teams x-resource: Team x-service: tf-api patch: description: | Update a team's attributes or users. The endpoint can be used to add or remove users from a team. operationId: update_team parameters: - in: path name: team required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - account - identity-provider - users type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/update-team-request.yml schema: $ref: '#/components/schemas/TeamDocument' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/update-team-response.yml schema: $ref: '#/components/schemas/TeamDocument' description: Successfully updated. '403': description: User unauthorized to perform this action. '404': description: Relationship not found or user unauthorized to read it. '409': description: Quota exceeded error. '422': description: Malformed request body (missing attributes, wrong types, etc.) 4XX: description: Client error. 5XX: description: Server error. summary: Update a Team tags: - teams x-resource: Team x-service: tf-api /usage-statistics: get: description: | This endpoint returns billing usage statistics for an account within a period of time. Required permission: accounts:billing operationId: list_usage_statistics parameters: - description: 'The date filter. Example: `filter[date]=between:2022-01-01T00:00:00Z,2022-02-01T00:00:00Z`' in: query name: filter[date] required: true schema: type: string - description: 'The account filter. Example: `filter[account]=acc-ttpu7uslju6igv8`' in: query name: filter[account] required: true schema: type: string - description: Breakdown by environment or workspace. in: query name: breakdown_by required: false schema: enum: - environment - workspace type: string - description: Summarize usage statistics by the whole period. in: query name: total required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/list-usage-statistics.yml schema: $ref: '#/components/schemas/UsageStatisticListingDocument' description: Success. '403': description: User unauthorized to perform the action. '404': description: Account or environment not found. 4XX: description: Client error. 5XX: description: Server error. summary: List Scalr Usage Statistics tags: - usage-statistics x-resource: UsageStatistic x-service: tf-api /users: get: description: | This endpoint returns a list of [IAM](https://docs.scalr.io/docs/identity-and-access-management) users. The response can be filtered by IdP: `filter[identity-provider]` or user ID: `filter[user]`. operationId: get_users parameters: - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The identity provider filter. in: query name: filter[identity-provider] required: false schema: type: string - description: User filter. in: query name: filter[user] required: false schema: type: string - description: Email filter. in: query name: filter[email] required: false schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - identity-providers - teams type: string type: array - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - created-at - email - full-name - last-login-at - status type: string type: array - description: Query string in: query name: query required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/list-users.yml schema: $ref: '#/components/schemas/UserListingDocument' description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List Users tags: - users x-resource: User x-service: tf-api post: description: | Create a new [IAM](https://docs.scalr.io/docs/identity-and-access-management) user without access to any account. To invite user to the account /accounts/:id/actions/invite should be used. operationId: create_user parameters: - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - identity-providers type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-user-request.yml schema: $ref: '#/components/schemas/CreateUserDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-user-response.yml schema: $ref: '#/components/schemas/CreateUserDocument' description: Successfully created. '403': description: User unauthorized to perform this action. '404': description: Relationship not found or user unauthorized. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Create a User tags: - users x-resource: User x-service: tf-api /users/{user}: delete: description: The endpoint deletes [IAM](https://docs.scalr.io/docs/identity-and-access-management) user by ID. operationId: delete_user parameters: - description: The ID of the user to delete. in: path name: user required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Successfully deleted. '403': description: User unauthorized to perform this action. '404': description: User not found. 4XX: description: Client error. 5XX: description: Server error. summary: Delete a User tags: - users x-resource: User x-service: tf-api get: description: This endpoint returns an [IAM](https://docs.scalr.io/docs/identity-and-access-management) user by ID. operationId: get_user parameters: - description: The ID of the user. in: path name: user required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - identity-providers - teams type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-user.yml schema: $ref: '#/components/schemas/UserDocument' description: Success. '403': description: User unauthorized to perform this action. '404': description: User not found. 4XX: description: Client error. 5XX: description: Server error. summary: Get a User tags: - users x-resource: User x-service: tf-api patch: description: This endpoint updates [IAM](https://docs.scalr.io/docs/identity-and-access-management) user by ID. operationId: update_user parameters: - description: The ID of the user to update. in: path name: user required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - identity-providers - teams type: string type: array - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/update-user-request.yml schema: $ref: '#/components/schemas/UserDocument' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/update-user-response.yml schema: $ref: '#/components/schemas/UserDocument' description: Successfully updated. '403': description: User unauthorized to perform this action. '404': description: User not found. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Update a User tags: - users x-resource: User x-service: tf-api /vars: get: description: | This endpoint returns a list of variables. Cloud Credentials are exposed as Terraform ENV Variables if filters are specified. operationId: get_variables parameters: - description: The ID of the environment to list variables for. in: query name: filter[environment] required: false schema: type: string - description: The ID of the workspace to list variables for. in: query name: filter[workspace] required: false schema: type: string - description: The variable category. in: query name: filter[category] required: false schema: type: string - description: The variable key. in: query name: filter[key] required: false schema: type: string - description: The ID(s) of variable(s). in: query name: filter[var] required: false schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-vars-response.yml schema: $ref: '#/components/schemas/VariableListingDocument' description: Success. '404': description: Workspace filter not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: List Variables tags: - variables x-resource: Variable x-service: tf-api post: description: Create a new terraform or ENV variable. operationId: create_variable parameters: - description: Enables the final variable to override variables from a lower scope. in: query name: force required: false schema: default: false type: boolean - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: env-level: $ref: examples/create-environment-var-request.yml ws-level: $ref: examples/create-workspace-var-request.yml schema: $ref: '#/components/schemas/VariableDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-var-response.yml schema: $ref: '#/components/schemas/VariableDocument' description: Successfully created a variable. '404': description: Relationship not found, or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.) 4XX: description: Client error. 5XX: description: Server error. summary: Create a Variable tags: - variables x-resource: Variable x-service: tf-api /vars/{var}: delete: operationId: delete_variable parameters: - description: The ID of the variable to delete. in: path name: var required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Variable deleted. '404': description: Variable not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Delete a Variable tags: - variables x-resource: Variable x-service: tf-api get: description: | Show details of a specific variable. For `sensitive: true` variables, their actual `value` is not exposed, and `null` returned instead. operationId: get_variable parameters: - description: The ID of the variable to show. example: ws-t68bpgu1vetpdh8 in: path name: var required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/VariableDocument' description: Success. '404': description: Variable not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Variable tags: - variables x-resource: Variable x-service: tf-api patch: operationId: update_variable parameters: - description: The ID of the variable to update. in: path name: var required: true schema: type: string - description: Enables the final variable to override variables from a lower scope in: query name: force required: false schema: default: false type: boolean - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/VariableDocument' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/VariableDocument' description: Successfully updates the variable. '404': description: Variable not found, or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.) 4XX: description: Client error. 5XX: description: Server error. summary: Update a Variable tags: - variables x-resource: Variable x-service: tf-api /vcs-providers: get: description: | This endpoint returns a list of VCS providers by various filters. To list VCS providers accessible from a specific environment - `filter[environment]`, or when from a specific account - `filter[account]` has to be specified. For self-hosted Scalr there's also an option to list all VCS providers created globally - both `filter[account]=null` and `filter[environment]=null` has to be specified. If no `environment` or `account` filters were specified, all VCS providers to which a current user has read access will be returned. operationId: list_vcs_providers parameters: - description: Full text search based on a VCS provider's `name` in: query name: query required: false schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The ID of the VCS provider. Multiple values are allowed through COMMA `,` in: query name: filter[vcs-provider] required: false schema: type: string - description: Filter by VCS type in: query name: filter[vcs-type] required: false schema: type: string - description: The environment filter in: query name: filter[environment] required: false schema: type: string - description: The account filter in: query name: filter[account] required: false schema: type: string - description: The agent pool filter in: query name: filter[agent-pool] required: false schema: type: string - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - name - vcs-type type: string type: array - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - agent-pool type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: agent-pools: description: The comma-separated list of fields to return in response for AgentPool resource. type: string vcs-providers: description: The comma-separated list of fields to return in response for VcsProvider resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-vcs-providers.yml schema: $ref: '#/components/schemas/VcsProviderListingDocument' description: Success. '403': description: User unauthorized to perform action. '404': description: Account or environment not found. 4XX: description: Client error. 5XX: description: Server error. summary: List VCS Providers tags: - vcs-providers x-resource: VcsProvider x-service: tf-api post: description: | Create a new VCS connection between Scalr and a VCS provider. VCS providers can be created at the Scalr account. Self-hosted Scalr also supports the creation of global VCS providers. If a VCS provider is created globally, all accounts within the self-hosted installation will have access to use the VCS provider. Only VCS providers with `personal_token` auth type, can be created through the API. If you need to setup `oauth2` provider, you should use Scalr [web interface](../../vcs_providers.html#github) to do this. operationId: create_vcs_provider parameters: - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-vcs-provider-request.yml schema: $ref: '#/components/schemas/VcsProviderDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-vcs-provider-response.yml schema: $ref: '#/components/schemas/VcsProviderDocument' description: Created. '403': description: User unauthorized to perform action. '404': description: Relationship resource not found, or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Create a VCS Provider tags: - vcs-providers x-resource: VcsProvider x-service: tf-api /vcs-providers/{vcs_provider}: delete: description: The endpoint deletes a VCS provider by ID. operationId: delete_vcs_provider parameters: - in: path name: vcs_provider required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Deleted. '404': description: VCS provider not found or user unauthorized. 4XX: description: Client error. 5XX: description: Server error. summary: Delete a VCS Provider tags: - vcs-providers x-resource: VcsProvider x-service: tf-api get: description: Show details of a specific VCS provider. operationId: get_vcs_provider parameters: - description: The ID of the VCS provider. in: path name: vcs_provider required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - agent-pool type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: agent-pools: description: The comma-separated list of fields to return in response for AgentPool resource. type: string vcs-providers: description: The comma-separated list of fields to return in response for VcsProvider resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/get-vcs-provider.yml schema: $ref: '#/components/schemas/VcsProviderDocument' description: Success. '404': description: VCS provider not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a VCS Provider tags: - vcs-providers x-resource: VcsProvider x-service: tf-api patch: description: | This endpoint allows updates to attributes of an existing VCS provider. operationId: update_vcs_provider parameters: - description: The ID of the VCS provider to update. in: path name: vcs_provider required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/update-vcs-provider-request.yml schema: $ref: '#/components/schemas/VcsProviderDocument' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/VcsProviderDocument' description: Updated. '403': description: User unauthorized to perform action. '404': description: Relationship resource not found, or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Update a VCS Provider tags: - vcs-providers x-resource: VcsProvider x-service: tf-api /vcs-tasks: post: operationId: create_vcs_task parameters: - $ref: '#/components/parameters/PreferParam' requestBody: content: application/json: schema: $ref: '#/components/schemas/VcsTaskRequest' responses: '202': description: Task is created. '404': description: VCS-driven workspaces not found. '409': description: Conflict creating task. 4XX: description: Client error. 5XX: description: Server error. summary: Create a task to queue runs from the commit for VCS-driven workspaces. tags: - vcs-tasks x-resource: null x-service: tf-api /webhooks: get: description: This endpoint lists webhooks. Deprecated, use /integrations/webhooks instead. operationId: list_webhooks parameters: - description: Enabled `true|false` only webhooks in: query name: filter[enabled] required: false schema: type: string - description: The ID of the Workspace in: query name: filter[workspace] required: false schema: type: string - description: The ID of the Environment in: query name: filter[environment] required: false schema: type: string - description: The ID of the Account in: query name: filter[account] required: false schema: type: string - description: The ID of the Event definition in: query name: filter[event] required: false schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - endpoint - workspace type: string type: array - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - name type: string type: array - description: Query string in: query name: query required: false schema: type: string - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: endpoints: description: The comma-separated list of fields to return in response for Endpoint resource. type: string webhooks: description: The comma-separated list of fields to return in response for Webhook resource. type: string workspaces: description: The comma-separated list of fields to return in response for Workspace resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/WebhookListingDocument' description: Success. '404': description: |- Account, environment, or workspace not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: List Webhooks tags: - webhooks x-resource: Webhook x-service: tf-api post: description: |- Create a new webhook bounded to the account, environment, or workspace. Deprecated, use /integrations/webhooks instead. operationId: create_webhook parameters: - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: endpoints: description: The comma-separated list of fields to return in response for Endpoint resource. type: string webhooks: description: The comma-separated list of fields to return in response for Webhook resource. type: string workspaces: description: The comma-separated list of fields to return in response for Workspace resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/create-webhook-request-body.yml schema: $ref: '#/components/schemas/WebhookDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-webhook-response.yml schema: $ref: '#/components/schemas/WebhookDocument' description: The webhook was created. '404': description: Relationship not found, or user unauthorized to perform action. '422': description: Invalid arguments. 4XX: description: Client error. 5XX: description: Server error. summary: Create Webhook tags: - webhooks x-resource: Webhook x-service: tf-api /webhooks/{webhook}: delete: operationId: delete_webhook parameters: - description: The ID of the webhook to delete. Deprecated, use /integrations/webhooks instead. in: path name: webhook required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Successfully deleted the webhook. '404': description: Webhook not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Delete a Webhook tags: - webhooks x-resource: Webhook x-service: tf-api get: description: Show details of a specific webhook. Deprecated, use /integrations/webhooks instead. operationId: get_webhook parameters: - description: The ID of the webhook. in: path name: webhook required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - endpoint - workspace type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: endpoints: description: The comma-separated list of fields to return in response for Endpoint resource. type: string webhooks: description: The comma-separated list of fields to return in response for Webhook resource. type: string workspaces: description: The comma-separated list of fields to return in response for Workspace resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/WebhookDocument' description: Success. '404': description: Webhook not found or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Webhook tags: - webhooks x-resource: Webhook x-service: tf-api patch: operationId: update_webhook parameters: - description: The ID of the webhook to update. Deprecated, use /integrations/webhooks instead. in: path name: webhook required: true schema: type: string - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: endpoints: description: The comma-separated list of fields to return in response for Endpoint resource. type: string webhooks: description: The comma-separated list of fields to return in response for Webhook resource. type: string workspaces: description: The comma-separated list of fields to return in response for Workspace resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/WebhookDocument' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/WebhookDocument' description: Successfully updated the webhook. '404': description: Relationship not found, or user unauthorized to perform action. '422': description: Invalid arguments. 4XX: description: Client error. 5XX: description: Server error. summary: Update Webhook tags: - webhooks x-resource: Webhook x-service: tf-api /workspaces: get: operationId: get_workspaces parameters: - description: The ID of the Environment in: query name: filter[environment] required: false schema: type: string - description: The ID(s) of the Workspace. in: query name: filter[workspace] required: false schema: type: string - description: The ID of the Account in: query name: filter[account] required: false schema: type: string - description: The ID of the User who created this workspace in: query name: filter[created-by] required: false schema: type: string - description: Workspace name in: query name: filter[name] required: false schema: type: string - description: Last run status in: query name: filter[run][status] required: false schema: type: string - description: Last run created by filter in: query name: filter[run][created-by] required: false schema: type: string - description: The ID(s) of the Agent Pool. in: query name: filter[agent-pool] required: false schema: type: string - description: The ID of the Software Version in: query name: filter[software-version] required: false schema: type: string - description: The ID of the Provider configuration. in: query name: filter[provider-configuration] required: false schema: type: string - description: The ID of the VCS provider in: query name: filter[vcs-provider] required: false schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: Query string, search by id, name. in: query name: query required: false schema: type: string - description: Date of workspace modification. in: query name: filter[updated-at] required: false schema: type: string - description: Deletion protection enabled filter in: query name: filter[deletion-protection-enabled] required: false schema: type: string - description: Has resources filter in: query name: filter[has-resources] required: false schema: type: string - description: The ID of the User who update this workspace in: query name: filter[updated-by] required: false schema: type: string - description: Filter workspaces by tags in: query name: filter[tag] required: false schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - agent-pool - configuration-version - created-by - environment - latest-configuration-version - latest-run - locked-by - locked-by-run - module - module-version - readme-id - tags - updated-by - vcs-provider type: string type: array - description: The comma-separated list of attributes. explode: false in: query name: sort required: false schema: items: enum: - environment - latest-run - name - updated-at type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: agent-pools: description: The comma-separated list of fields to return in response for AgentPool resource. type: string configuration-versions: description: The comma-separated list of fields to return in response for ConfigurationVersion resource. type: string environments: description: The comma-separated list of fields to return in response for Environment resource. type: string module-versions: description: The comma-separated list of fields to return in response for ModuleVersion resource. type: string modules: description: The comma-separated list of fields to return in response for Module resource. type: string runs: description: The comma-separated list of fields to return in response for Run resource. type: string tags: description: The comma-separated list of fields to return in response for Tag resource. type: string users: description: The comma-separated list of fields to return in response for User resource. type: string vcs-providers: description: The comma-separated list of fields to return in response for VcsProvider resource. type: string workspace-readme: description: The comma-separated list of fields to return in response for WorkspaceReadme resource. type: string workspaces: description: The comma-separated list of fields to return in response for Workspace resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/WorkspaceListingDocument' description: Success. '404': description: Environment not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: List Workspaces tags: - workspaces x-resource: Workspace x-service: tf-api post: description: | Workspaces represent a unit of infrastructure managed by terraform. To create a workspace you must pass `name` attribute and `environment` relationship. A workspace might be linked to a VCS repository, so that any git push will trigger a terraform Run in the workspace. operationId: create_workspace parameters: - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: tags: $ref: examples/create-workspace-request-tags.yml vcs: $ref: examples/create-workspace-request-vcs.yml vcs-less: $ref: examples/create-workspace-request-vcs-less.yml schema: $ref: '#/components/schemas/WorkspaceDocument' responses: '201': content: application/vnd.api+json: examples: default: $ref: examples/create-workspace-response.yml schema: $ref: '#/components/schemas/WorkspaceDocument' description: Success. '404': description: Environment not found, or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Create a Workspace tags: - workspaces x-resource: Workspace x-service: tf-api /workspaces/{workspace}: delete: operationId: delete_workspace parameters: - description: The ID of the workspace to be deleted. in: path name: workspace required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '204': description: Successfully deleted the workspace. '404': description: Workspace not found, or user unauthorized to perform action. '409': description: |- Workspace can't be deleted because it has managed resources and deletion protection is enabled. 4XX: description: Client error. 5XX: description: Server error. summary: Delete a Workspace tags: - workspaces x-resource: Workspace x-service: tf-api get: description: Show details of a specific workspace. operationId: get_workspace parameters: - description: The workspace ID to show. in: path name: workspace required: true schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - agent-pool - configuration-version - created-by - environment - latest-configuration-version - latest-run - locked-by - locked-by-run - module - module-version - readme-id - tags - updated-by - vcs-provider type: string type: array - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of the fields to be returned for the resource. An empty value indicates that no fields should be returned. explode: true in: query name: fields required: false schema: properties: agent-pools: description: The comma-separated list of fields to return in response for AgentPool resource. type: string configuration-versions: description: The comma-separated list of fields to return in response for ConfigurationVersion resource. type: string environments: description: The comma-separated list of fields to return in response for Environment resource. type: string module-versions: description: The comma-separated list of fields to return in response for ModuleVersion resource. type: string modules: description: The comma-separated list of fields to return in response for Module resource. type: string runs: description: The comma-separated list of fields to return in response for Run resource. type: string tags: description: The comma-separated list of fields to return in response for Tag resource. type: string users: description: The comma-separated list of fields to return in response for User resource. type: string vcs-providers: description: The comma-separated list of fields to return in response for VcsProvider resource. type: string workspace-readme: description: The comma-separated list of fields to return in response for WorkspaceReadme resource. type: string workspaces: description: The comma-separated list of fields to return in response for Workspace resource. type: string type: object style: deepObject - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/WorkspaceDocument' description: Success. '404': description: Workspace not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get a Workspace tags: - workspaces x-resource: Workspace x-service: tf-api patch: operationId: update_workspace parameters: - description: The ID of the workspace to be updated. in: path name: workspace required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/WorkspaceDocument' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/WorkspaceDocument' description: Success. '404': description: Workspace not found, or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Update a Workspace tags: - workspaces x-resource: Workspace x-service: tf-api /workspaces/{workspace}/actions/lock: post: description: This endpoint locks a workspace. operationId: lock_workspace parameters: - description: The workspace ID to lock. in: path name: workspace required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/json: schema: $ref: '#/components/schemas/Reason' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/WorkspaceDocument' description: Successfully locked the workspace. '404': description: Workspace not found, or user unauthorized to perform action. '409': description: Workspace already locked. 4XX: description: Client error. 5XX: description: Server error. summary: Lock a Workspace tags: - workspaces x-resource: Workspace x-service: tf-api /workspaces/{workspace}/actions/resync: post: description: |- This endpoint triggers a Configuration Version resync for a Workspace associated with a VCS repository. operationId: resync_workspace parameters: - description: The ID of the workspace to resync. in: path name: workspace required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '201': content: application/vnd.api+json: schema: $ref: '#/components/schemas/ConfigurationVersionDocument' description: Success. '404': description: Workspace not found or user unauthorized to perform action. '409': description: Workspace is not bound to any repository. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Resync a Workspace tags: - workspaces x-resource: Workspace x-service: tf-api /workspaces/{workspace}/actions/set-schedule: post: operationId: set_schedule parameters: - description: The ID of the workspace to be updated. in: path name: workspace required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/json: schema: $ref: '#/components/schemas/WorkspaceSchedule' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/WorkspaceDocument' description: Success. '404': description: Workspace not found, or user unauthorized to perform action. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Set scheduled runs for the workspace tags: - workspaces x-resource: Workspace x-service: tf-api /workspaces/{workspace}/actions/unlock: post: description: This endpoint unlocks a workspace. operationId: unlock_workspace parameters: - description: The workspace ID to unlock. in: path name: workspace required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/WorkspaceDocument' description: Successfully unlocked the workspace. '404': description: Workspace not found, or user unauthorized to perform action. '409': description: Workspace already unlocked, or locked by a different user. 4XX: description: Client error. 5XX: description: Server error. summary: Unlock a Workspace tags: - workspaces x-resource: Workspace x-service: tf-api /workspaces/{workspace}/current-state-version: get: description: |- Fetch the current state version for the given workspace. This state version will be the input state when running terraform operations. operationId: get_current_state_version parameters: - description: The ID of the workspace. in: path name: workspace required: true schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/StateVersionDocument' description: Successfully returned current state version for the given workspace. '404': description: |- Workspace not found, workspace does not have a current state version, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: Get Workspace's Current State Version tags: - state-versions x-resource: StateVersion x-service: tf-api /workspaces/{workspace}/provider-configuration-links: get: description: | This endpoint returns a list of Provider configuration links or configurations that are used during the workspace runs. operationId: list_provider_configuration_links parameters: - description: | The ID of the Workspace. in: path name: workspace required: true schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - description: The comma-separated list of relationship paths. explode: false in: query name: include required: false schema: items: enum: - provider-configuration type: string type: array - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationLinkListingDocument' description: Success. '403': description: User unauthorized to perform action. '404': description: Workspace not found. 4XX: description: Client error. 5XX: description: Server error. summary: List Provider configuration workspace links tags: - provider-configuration-links x-resource: ProviderConfigurationLink x-service: tf-api post: description: | Attach a Provider configuration to the workspace. operationId: create_provider_configuration_link parameters: - description: | The ID of the Workspace. in: path name: workspace required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationLinkDocument' responses: '201': content: application/vnd.api+json: schema: $ref: '#/components/schemas/ProviderConfigurationLinkDocument' description: Created. '403': description: User unauthorized to perform action. '404': description: Workspace or Provider configuration not found. '422': description: Malformed request body (missing attributes, wrong types, etc.). 4XX: description: Client error. 5XX: description: Server error. summary: Attach a Provider configuration to the workspace tags: - provider-configuration-links x-resource: ProviderConfigurationLink x-service: tf-api /workspaces/{workspace}/relationships/remote-state-consumers: delete: description: | This endpoint removes provided workspaces from a list of allowed remote state consumers for a given workspace. operationId: delete_remote_state_consumers parameters: - description: | The ID of the workspace. in: path name: workspace required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/add-remote-state-consumers-request.yml schema: $ref: '#/components/schemas/RemoteStateConsumerRelationshipFieldsetsListingDocument' responses: '204': description: Success. '403': description: User unauthorized to perform this action. '404': description: Workspace not found, or user unauthorized to perform action. '409': description: Not allowed. `global-remote-state` is enabled for the workspace. 4XX: description: Client error. 5XX: description: Server error. summary: Delete remote state consumers tags: - remote-state-consumers x-resource: Workspace x-service: tf-api get: description: | This endpoint returns a list of other workspaces that are allowed to access the given workspace's state during runs. operationId: list_remote_state_consumers parameters: - description: | The ID of the workspace. in: path name: workspace required: true schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/list-remote-state-consumers-response.yml schema: $ref: '#/components/schemas/RemoteStateConsumerRelationshipFieldsetsListingDocument' description: Request was successful. '403': description: User unauthorized to perform this action. '404': description: Workspace not found, or user unauthorized to perform action. 4XX: description: Client error. 5XX: description: Server error. summary: List remote state consumers tags: - remote-state-consumers x-resource: Workspace x-service: tf-api patch: description: | This endpoint replaces a list of allowed remote state consumers for a given workspace. operationId: replace_remote_state_consumers parameters: - description: | The ID of the workspace. in: path name: workspace required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/add-remote-state-consumers-request.yml empty: $ref: examples/replace-remote-state-consumers-empty-request.yml schema: $ref: '#/components/schemas/RemoteStateConsumerRelationshipFieldsetsListingDocument' responses: '204': description: Success. '403': description: User unauthorized to perform this action. '404': description: Workspace not found, or user unauthorized to perform action. '409': description: Not allowed. `global-remote-state` is enabled for the workspace. 4XX: description: Client error. 5XX: description: Server error. summary: Replace remote state consumers tags: - remote-state-consumers x-resource: Workspace x-service: tf-api post: description: | This endpoint adds provided workspaces to a list of allowed remote state consumers for a given workspace. operationId: add_remote_state_consumers parameters: - description: | The ID of the workspace. in: path name: workspace required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/add-remote-state-consumers-request.yml schema: $ref: '#/components/schemas/RemoteStateConsumerRelationshipFieldsetsListingDocument' responses: '204': description: Success. '403': description: User unauthorized to perform this action. '404': description: Workspace not found, or user unauthorized to perform action. '409': description: Not allowed. `global-remote-state` is enabled for the workspace. 4XX: description: Client error. 5XX: description: Server error. summary: Add remote state consumers tags: - remote-state-consumers x-resource: Workspace x-service: tf-api /workspaces/{workspace}/relationships/tags: delete: description: | This endpoint removes given [tags](tags.html#the-tag-resource) from the workspace. operationId: delete_workspace_tags parameters: - description: | The workspace whose tags will be deleted. in: path name: workspace required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/update-resource-tags-request.yml schema: $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument' responses: '204': description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: Delete workspace's tags tags: - workspaces x-resource: Workspace x-service: tf-api get: description: | This endpoint returns a list of [tags](tags.html#the-tag-resource), assigned to a workspace. operationId: list_workspace_tags parameters: - description: | The workspace to list tags for. in: path name: workspace required: true schema: type: string - description: Page number in: query name: page[number] required: false schema: type: string - description: Page size in: query name: page[size] required: false schema: type: string - $ref: '#/components/parameters/PreferParam' responses: '200': content: application/vnd.api+json: examples: default: $ref: examples/list-workspace-tags-response.yml schema: $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument' description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: List workspace's tags tags: - workspaces x-resource: Workspace x-service: tf-api patch: description: | This endpoint completely replaces workspace's tags with provided list. operationId: replace_workspace_tags parameters: - description: | The workspace whose tags will be replaced. in: path name: workspace required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/update-resource-tags-request.yml empty: $ref: examples/replace-resource-tags-empty-request.yml schema: $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument' responses: '204': description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: Replace workspace's tags tags: - workspaces x-resource: Workspace x-service: tf-api post: description: | This endpoint assigns the list of [tags](tags.html#the-tag-resource) to the workspace. operationId: add_workspace_tags parameters: - description: | The workspace to add the tags to. in: path name: workspace required: true schema: type: string - $ref: '#/components/parameters/PreferParam' requestBody: content: application/vnd.api+json: examples: default: $ref: examples/update-resource-tags-request.yml schema: $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument' responses: '204': description: Success. '403': description: User unauthorized to perform this action. 4XX: description: Client error. 5XX: description: Server error. summary: Add tags to the workspace tags: - workspaces x-resource: Workspace x-service: tf-api security: - API-Key: [] servers: - url: https://{Domain}/api/iacp/v3 variables: Domain: default: example.scalr.io description: Domain where Scalr is hosted