List supported locations

GET /v2/locations

Retrieve a list of IBM Cloud locations where you can work with the Schematics objects.

<h3>Authorization</h3> 

Schematics support generic authorization for its resources. 
For more information, about Schematics access and permissions, 
see [Schematics service access roles and required permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).

Request

Response

200 - Successfully listed all the locations.

locations

array

The list of locations.

401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

message

string

Message text

message_id

string

The message ID for translation.

request_id

string

The request ID for request tracking.

status_code

integer

The API response code.

timestamp

string

The API response timestamp.

403 - Unauthorized access. Check that you have the correct access credentials and permissions.

message

string

Message text

message_id

string

The message ID for translation.

request_id

string

The request ID for request tracking.

status_code

integer

The API response code.

timestamp

string

The API response timestamp.

500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

message

string

Message text

message_id

string

The message ID for translation.

request_id

string

The request ID for request tracking.

status_code

integer

The API response code.

timestamp

string

The API response timestamp.

List resource groups

GET /v1/resource_groups

Retrieve a list of IBM Cloud resource groups that your account has access to.

<h3>Authorization</h3> 

Schematics support generic authorization for its resources. 
For more information, about Schematics access and permissions, 
see [Schematics service access roles and required permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).

Request

Response

200 - Successfully returned resource groups information.

401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

message

string

Message text

message_id

string

The message ID for translation.

request_id

string

The request ID for request tracking.

status_code

integer

The API response code.

timestamp

string

The API response timestamp.

Get Schematics API information

GET /v1/version

Retrieve detailed information about the IBM Cloud Schematics API version and the version of the provider plug-ins that the API uses.

Request

Response

200 - Successfully returned version information.

builddate

string

The date when the API version was built.

buildno

string

The build number that the API is based on.

commitsha

string

The SHA value for the Git commit that represents the latest version of the API.

helm_provider_version

string

The Terraform Helm provider version that is used when you install Helm charts with Schematics.

helm_version

string

The Helm version that is used when you install Helm charts with Schematics.

supported_template_types

object

Supported template types

terraform_provider_version

string

The version of the IBM Cloud Terraform provider plug-in that is used when you apply Terraform templates with Schematics.

terraform_version

string

The Terraform version that is used when you apply Terraform templates with Schematics.

API endpoints.

<h3>Authorization</h3> 

Schematics support generic authorization for its resources. 
For more information, about Schematics access and permissions, 
see [Schematics service access roles and required permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).">

List workspaces

GET /v1/workspaces

Retrieve a list of Schematics workspaces from your IBM Cloud account that you have access to. The list of workspaces that is returned depends on the API endpoint that you use. For example, if you use an API endpoint for a geography, such as North America, only workspaces that are created in `us-south` or `us-east` are returned.

For more information about supported API endpoints, see API endpoints.

<h3>Authorization</h3> 

Schematics support generic authorization for its resources. 
For more information, about Schematics access and permissions, 
see [Schematics service access roles and required permissions](https://cloud.ibm.com/docs/schematics?topic=schematics-access#access-roles).

Auditing

Calling this method generates the following auditing event.

  • schematics.workspace.list

Request

Path Parameters

Query Parameters

offset

integer

The starting position of the item in the list of items. For example, if you have three workspaces in your account, the first workspace is assigned position number 0, the second workspace is assigned position number 1, and so forth. If you have 6 workspaces and you want to list the details for workspaces `2-6`, enter 1. To limit the number of workspaces that is returned, use the `limit` option in addition to the `offset` option. Negative numbers are not supported and are ignored.

limit

integer

The maximum number of items that you want to list. The number must be a positive integer between 1 and 2000. If no value is provided, 100 is used by default.

profile

string

Level of details returned by the get method

resource_group

string

The resource group (by default, fetch from all resource groups) name or ID

Response

200 - Successfully listed the workspaces that you have access to.

count

integer

The number of workspaces in the IBM Cloud account that you have access to and that matched your search criteria.

limit

integer

The `limit` value that you set in your API request and that represents the maximum number of workspaces that you wanted to list.

offset

integer

The `offset` value that you set in your API request. The offset value represents the position number of the workspace from which you wanted to start listing your workspaces.

workspaces

array

The list of workspaces that was included in your API response.

401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

message

string

Message text

message_id

string

The message ID for translation.

request_id

string

The request ID for request tracking.

status_code

integer

The API response code.

timestamp

string

The API response timestamp.

403 - Unauthorized access. Check that you have the correct access credentials and permissions.

message

string

Message text

message_id

string

The message ID for translation.

request_id

string

The request ID for request tracking.

status_code

integer

The API response code.

timestamp

string

The API response timestamp.

500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

message

string

Message text

message_id

string

The message ID for translation.

request_id

string

The request ID for request tracking.

status_code

integer

The API response code.

timestamp

string

The API response timestamp.

API endpoints for more information.

  • If you use the API endpoint for a geography and not a specific location, such as North America, you can specify the location in your API request body.

  • If you do not specify the location in the request body, Schematics determines your workspace location based on availability.

  • If you use an API endpoint for a specific location, such as Frankfurt, the location that you enter in your API request body must match your API endpoint.

  • You also have the option to not specify a location in your API request body if you use a location-specific API endpoint.

  • Getting IAM access token :-

    • Before you create Schematics workspace, you need to create the IAM access token for your IBM Cloud Account.

    • To create IAM access token, use `export IBMCLOUD_API_KEY=<ibmcloud_api_key>` and execute `curl -X POST "https://iam.cloud.ibm.com/identity/token" -H "Content-Type= application/x-www-form-urlencoded" -d "grant_type=urn:ibm:params:oauth:grant-type:apikey&apikey=$IBMCLOUD_API_KEY" -u bx:bx`. For more information, about creating IAM access token and API Docs, see IAM access token and Create API key.

    • You can set the environment values `export ACCESS_TOKEN=<access_token>` and `export REFRESH_TOKEN=<refresh_token>`.

    • You can use the obtained IAM access token in create workspace `curl` command.

      <h3>Authorization</h3>

      Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.">

    Create a workspace

    POST /v1/workspaces

    Create an IBM Cloud Schematics workspace that points to the source repository where your Terraform template or the IBM Cloud software template is stored. You can decide to create your workspace without connecting it to a GitHub or GitLab repository. Your workspace is then created with a Draft state. To later connect your workspace to a GitHub or GitLab repository, you must use the `PUT /v1/workspaces/{id}` API to update the workspace or use the `/v1/workspaces/{id}/templates/{template_id}/template_repo_upload` API to upload a TAR file instead.

    Getting API endpoint:-

    • The Schematics API endpoint that you use to create the workspace determines where your Schematics actions run and your data is stored. See API endpoints for more information.

    • If you use the API endpoint for a geography and not a specific location, such as North America, you can specify the location in your API request body.

    • If you do not specify the location in the request body, Schematics determines your workspace location based on availability.

    • If you use an API endpoint for a specific location, such as Frankfurt, the location that you enter in your API request body must match your API endpoint.

    • You also have the option to not specify a location in your API request body if you use a location-specific API endpoint.

    Getting IAM access token :-

    • Before you create Schematics workspace, you need to create the IAM access token for your IBM Cloud Account.

    • To create IAM access token, use `export IBMCLOUD_API_KEY=<ibmcloud_api_key>` and execute `curl -X POST "https://iam.cloud.ibm.com/identity/token" -H "Content-Type= application/x-www-form-urlencoded" -d "grant_type=urn:ibm:params:oauth:grant-type:apikey&apikey=$IBMCLOUD_API_KEY" -u bx:bx`. For more information, about creating IAM access token and API Docs, see IAM access token and Create API key.

    • You can set the environment values `export ACCESS_TOKEN=<access_token>` and `export REFRESH_TOKEN=<refresh_token>`.

    • You can use the obtained IAM access token in create workspace `curl` command.

      <h3>Authorization</h3>

      Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.workspace.create

    Request

    Request Body

    WorkspaceCreateRequest

    Input parameter to create the IBM Cloud Schematics workspace.

    applied_shareddata_ids

    array

    List of applied shared dataset ID.

    catalog_ref

    CatalogRef

    Information about the software template that you chose from the IBM Cloud catalog. This information is returned for IBM Cloud catalog offerings only.

    dry_run

    boolean

    Dry run

    owning_account

    string

    Owning account ID of the catalog.

    item_icon_url

    string

    The URL to the icon of the software template in the IBM Cloud catalog.

    item_id

    string

    The ID of the software template that you chose to install from the IBM Cloud catalog. This software is provisioned with Schematics.

    item_name

    string

    The name of the software that you chose to install from the IBM Cloud catalog.

    item_readme_url

    string

    The URL to the readme file of the software template in the IBM Cloud catalog.

    item_url

    string

    The URL to the software template in the IBM Cloud catalog.

    launch_url

    string

    The URL to the dashboard to access your software.

    offering_version

    string

    The version of the software template that you chose to install from the IBM Cloud catalog.

    service_extensions

    array

    Service Extensions

    dependencies

    Dependencies

    Workspace dependencies

    parents

    array

    List of workspace parents CRN identifiers

    children

    array

    List of workspace children CRN identifiers

    description

    string

    The description of the workspace.

    location

    string

    The location where you want to create your Schematics workspace and run the Schematics jobs. The location that you enter must match the API endpoint that you use. For example, if you use the Frankfurt API endpoint, you must specify `eu-de` as your location. If you use an API endpoint for a geography and you do not specify a location, Schematics determines the location based on availability.

    name

    string

    The name of your workspace. The name can be up to 128 characters long and can include alphanumeric characters, spaces, dashes, and underscores. When you create a workspace for your own Terraform template, consider including the microservice component that you set up with your Terraform template and the IBM Cloud environment where you want to deploy your resources in your name.

    resource_group

    string

    The ID of the resource group where you want to provision the workspace.

    shared_data

    SharedTargetData

    Information about the Target used by the templates originating from the IBM Cloud catalog offerings. This information is not relevant for workspace created using your own Terraform template.

    cluster_created_on

    string

    Cluster created on.

    cluster_id

    string

    The ID of the cluster where you want to provision the resources of all IBM Cloud catalog templates that are included in the catalog offering.

    cluster_name

    string

    The cluster name.

    cluster_type

    string

    The cluster type.

    entitlement_keys

    array

    The entitlement key that you want to use to install IBM Cloud entitled software.

    namespace

    string

    The Kubernetes namespace or OpenShift project where the resources of all IBM Cloud catalog templates that are included in the catalog offering are deployed into.

    region

    string

    The IBM Cloud region that you want to use for the resources of all IBM Cloud catalog templates that are included in the catalog offering.

    resource_group_id

    string

    The ID of the resource group that you want to use for the resources of all IBM Cloud catalog templates that are included in the catalog offering.

    worker_count

    integer

    The cluster worker count.

    worker_machine_type

    string

    The cluster worker type.

    tags

    array

    A list of tags that are associated with the workspace.

    template_data

    array

    Input data for the Template

    template_ref

    string

    Workspace template ref

    template_repo

    TemplateRepoRequest

    Input variables for the Template repoository, while creating a workspace

    branch

    string

    The repository branch

    release

    string

    The repository release.

    repo_sha_value

    string

    The repository SHA value.

    repo_url

    string

    The repository URL.

    url

    string

    The source URL.

    skip_submodules_checkout

    boolean

    Set this variable to checkout git sub-modules.

    type

    array

    List of Workspace type

    workspace_status

    WorkspaceStatusRequest

    WorkspaceStatusRequest -

    frozen

    boolean

    If set to true, the workspace is frozen and changes to the workspace are disabled.

    frozen_at

    string

    The timestamp when the workspace was frozen.

    frozen_by

    string

    The user ID that froze the workspace.

    locked

    boolean

    If set to true, the workspace is locked and disabled for changes.

    locked_by

    string

    The user ID that initiated a resource-related job, such as applying or destroying resources, that locked the workspace.

    locked_time

    string

    The timestamp when the workspace was locked.

    agent_id

    string

    agent id which is binded to with the workspace.

    settings

    array

    Input settings to be applied to the workspace, for example, `job_timeout_override`

    Path Parameters

    Query Parameters

    Response

    201 - Successfully created the workspace in IBM Cloud Schematics. Your resources are not provisioned until you use the `POST /workspaces/{id}/apply` API.

    applied_shareddata_ids

    array

    List of applied shared dataset ID.

    catalog_ref

    CatalogRef

    Information about the software template that you chose from the IBM Cloud catalog. This information is returned for IBM Cloud catalog offerings only.

    created_at

    string

    The timestamp when the workspace was created.

    created_by

    string

    The user ID that created the workspace.

    crn

    string

    The workspace CRN.

    dependencies

    Dependencies

    Workspace dependencies

    description

    string

    The description of the workspace.

    id

    string

    The unique identifier of the workspace.

    last_health_check_at

    string

    The timestamp when the last health check was performed by Schematics.

    location

    string

    The IBM Cloud location where your workspace was provisioned.

    name

    string

    The name of the workspace.

    resource_group

    string

    The resource group the workspace was provisioned in.

    runtime_data

    array

    Information about the provisioning engine, state file, and runtime logs.

    shared_data

    SharedTargetDataResponse

    Information about the Target used by the templates originating from IBM Cloud catalog offerings. This information is not relevant when you create a workspace from your own Terraform template.

    status

    string

    The status of the workspace.

    **Active**: After you successfully ran your infrastructure code by applying your Terraform execution plan, the state of your workspace changes to &#x60;Active&#x60;. 
    
    **Connecting**: Schematics tries to connect to the template in your source repo. If successfully connected, the template is downloaded and metadata, such as input parameters, is extracted. After the template is downloaded, the state of the workspace changes to &#x60;Scanning&#x60;. 
    
    **Draft**: The workspace is created without a reference to a GitHub or GitLab repository. 
    
    **Failed**: If errors occur during the execution of your infrastructure code in IBM Cloud Schematics, your workspace status is set to &#x60;Failed&#x60;. 
    
    **Inactive**: The Terraform template was scanned successfully and the workspace creation is complete. You can now start running Schematics plan and apply jobs to provision the IBM Cloud resources that you specified in your template. If you have an &#x60;Active&#x60; workspace and decide to remove all your resources, your workspace is set to &#x60;Inactive&#x60; after all your resources are removed. 
    
    **In progress**: When you instruct IBM Cloud Schematics to run your infrastructure code by applying your Terraform execution plan, the status of our workspace changes to &#x60;In progress&#x60;. 
    
    **Scanning**: The download of the Terraform template is complete and vulnerability scanning started. If the scan is successful, the workspace state changes to &#x60;Inactive&#x60;. If errors in your template are found, the state changes to &#x60;Template Error&#x60;. 
    
    **Stopped**: The Schematics plan, apply, or destroy job was cancelled manually. 
    
    **Template Error**: The Schematics template contains errors and cannot be processed.
    

    tags

    array

    A list of tags that are associated with the workspace.

    template_data

    array

    Information about the Terraform or IBM Cloud software template that you want to use.

    template_ref

    string

    Workspace template reference.

    template_repo

    TemplateRepoResponse

    Information about the Template repository used by the workspace

    type

    array

    The Terraform version that was used to run your Terraform code.

    updated_at

    string

    The timestamp when the workspace was last updated.

    updated_by

    string

    The user ID that updated the workspace.

    cart_id

    string

    The associate cart order ID.

    project_id

    string

    The associate project ID.

    last_action_name

    string

    Name of the last Action performed on workspace.

    last_activity_id

    string

    ID of last Activity performed.

    last_job

    LastJob

    Last job details

    workspace_status

    WorkspaceStatusResponse

    Response that indicate the status of the workspace as either frozen or locked.

    workspace_status_msg

    WorkspaceStatusMessage

    Information about the last job that ran against the workspace. -

    agent

    AgentInfo

    Agent name, Agent id and associated policy ID information

    settings

    array

    Input settings to be applied to the workspace, for example, `job_timeout_override`

    git_token_ref

    string

    secrets manager reference to git token

    encryption

    EncryptionInfo

    Encryption details about the workspace such as scheme (byok/kyok) and key CRN.

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The workspace already exists. To find a list of workspaces, use the `GET /workspaces` API.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The workspace is frozen and disabled. Unfreeze the workspace first before you retry the request. Or the Schematics create, update, delete action has not completed. Wait until the create, update, delete, plan, apply, destroy or refresh action completes before you try again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    429 - Too many requests have been made within a time window. "IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The host can be `us-east`, `us-south`, `eu-gb`, or `eu-de` region". Wait before calling the API again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    503 - IBM Cloud Schematics could not process the request, due to a temporary overloading or maintenance. Try to reduce your request rate, or retry after a few minutes. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Delete a workspace

    DELETE /v1/workspaces/{w_id}

    Deletes a workspace from IBM Cloud Schematics. Deleting a workspace does not automatically remove the IBM Cloud resources that the workspace manages. To remove all resources that are associated with the workspace, use the `DELETE /v1/workspaces/{id}?destroy_resources=true` API.

    Note: If you delete a workspace without deleting the resources, you must manage your resources with the resource dashboard or CLI afterwards. You cannot use IBM Cloud Schematics anymore to manage your resources.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.workspace.delete

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.

    Query Parameters

    destroy_resources

    string

    If set to `true`, refresh_token header configuration is required to delete all the Terraform resources, and the Schematics workspace. If set to `false`, you can remove only the workspace. Your Terraform resources are still available and must be managed with the resource dashboard or CLI.

    Response

    200 - Successfully deleted the workspace.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The workspace is frozen and disabled. Unfreeze the workspace first before you retry the request. Or the Schematics create, update, delete action has not completed. Wait until the create, update, delete, plan, apply, destroy or refresh action completes before you try again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    429 - Too many requests have been made within a time window. "IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The host can be `us-east`, `us-south`, `eu-gb`, or `eu-de` region". Wait before calling the API again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    503 - IBM Cloud Schematics could not process the request, due to a temporary overloading or maintenance. Try to reduce your request rate, or retry after a few minutes. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Get workspace details

    GET /v1/workspaces/{w_id}

    Retrieve detailed information for a workspace in your IBM Cloud account.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.workspace.read

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.

    Query Parameters

    Response

    200 - Successfully retrieved details about your workspace.

    applied_shareddata_ids

    array

    List of applied shared dataset ID.

    catalog_ref

    CatalogRef

    Information about the software template that you chose from the IBM Cloud catalog. This information is returned for IBM Cloud catalog offerings only.

    created_at

    string

    The timestamp when the workspace was created.

    created_by

    string

    The user ID that created the workspace.

    crn

    string

    The workspace CRN.

    dependencies

    Dependencies

    Workspace dependencies

    description

    string

    The description of the workspace.

    id

    string

    The unique identifier of the workspace.

    last_health_check_at

    string

    The timestamp when the last health check was performed by Schematics.

    location

    string

    The IBM Cloud location where your workspace was provisioned.

    name

    string

    The name of the workspace.

    resource_group

    string

    The resource group the workspace was provisioned in.

    runtime_data

    array

    Information about the provisioning engine, state file, and runtime logs.

    shared_data

    SharedTargetDataResponse

    Information about the Target used by the templates originating from IBM Cloud catalog offerings. This information is not relevant when you create a workspace from your own Terraform template.

    status

    string

    The status of the workspace.

    **Active**: After you successfully ran your infrastructure code by applying your Terraform execution plan, the state of your workspace changes to &#x60;Active&#x60;. 
    
    **Connecting**: Schematics tries to connect to the template in your source repo. If successfully connected, the template is downloaded and metadata, such as input parameters, is extracted. After the template is downloaded, the state of the workspace changes to &#x60;Scanning&#x60;. 
    
    **Draft**: The workspace is created without a reference to a GitHub or GitLab repository. 
    
    **Failed**: If errors occur during the execution of your infrastructure code in IBM Cloud Schematics, your workspace status is set to &#x60;Failed&#x60;. 
    
    **Inactive**: The Terraform template was scanned successfully and the workspace creation is complete. You can now start running Schematics plan and apply jobs to provision the IBM Cloud resources that you specified in your template. If you have an &#x60;Active&#x60; workspace and decide to remove all your resources, your workspace is set to &#x60;Inactive&#x60; after all your resources are removed. 
    
    **In progress**: When you instruct IBM Cloud Schematics to run your infrastructure code by applying your Terraform execution plan, the status of our workspace changes to &#x60;In progress&#x60;. 
    
    **Scanning**: The download of the Terraform template is complete and vulnerability scanning started. If the scan is successful, the workspace state changes to &#x60;Inactive&#x60;. If errors in your template are found, the state changes to &#x60;Template Error&#x60;. 
    
    **Stopped**: The Schematics plan, apply, or destroy job was cancelled manually. 
    
    **Template Error**: The Schematics template contains errors and cannot be processed.
    

    tags

    array

    A list of tags that are associated with the workspace.

    template_data

    array

    Information about the Terraform or IBM Cloud software template that you want to use.

    template_ref

    string

    Workspace template reference.

    template_repo

    TemplateRepoResponse

    Information about the Template repository used by the workspace

    type

    array

    The Terraform version that was used to run your Terraform code.

    updated_at

    string

    The timestamp when the workspace was last updated.

    updated_by

    string

    The user ID that updated the workspace.

    cart_id

    string

    The associate cart order ID.

    project_id

    string

    The associate project ID.

    last_action_name

    string

    Name of the last Action performed on workspace.

    last_activity_id

    string

    ID of last Activity performed.

    last_job

    LastJob

    Last job details

    workspace_status

    WorkspaceStatusResponse

    Response that indicate the status of the workspace as either frozen or locked.

    workspace_status_msg

    WorkspaceStatusMessage

    Information about the last job that ran against the workspace. -

    agent

    AgentInfo

    Agent name, Agent id and associated policy ID information

    settings

    array

    Input settings to be applied to the workspace, for example, `job_timeout_override`

    git_token_ref

    string

    secrets manager reference to git token

    encryption

    EncryptionInfo

    Encryption details about the workspace such as scheme (byok/kyok) and key CRN.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The specified workspace could not be found. Verify that the workspace ID is correct. To list workspaces in your IBM Cloud account, use the `GET /v1/workspaces API`.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Update workspace metadata

    PATCH /v1/workspaces/{w_id}

    Use this API to update the following workspace metadata:

    • Workspace name (`name`) - Note: Updating the workspace name does not update the ID of the workspace.
    • Workspace description (`description`)
    • Tags (`tags[]`)
    • Resource group (`resource_group`)
    • Workspace status (`workspace_status.frozen`)

    Tip: If you want to update information about the Terraform template or IBM Cloud catalog software template that your workspace points to, use the `PUT /v1/workspaces/{id}` API. To update workspace variables, use the `PUT /v1/workspaces/{id}/template_data/{template_id}/values` API.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.workspace.update

    Request

    Request Body

    WorkspaceUpdateRequest

    Input parameters to update workspace metadata.

    catalog_ref

    CatalogRef

    Information about the software template that you chose from the IBM Cloud catalog. This information is returned for IBM Cloud catalog offerings only.

    dry_run

    boolean

    Dry run

    owning_account

    string

    Owning account ID of the catalog.

    item_icon_url

    string

    The URL to the icon of the software template in the IBM Cloud catalog.

    item_id

    string

    The ID of the software template that you chose to install from the IBM Cloud catalog. This software is provisioned with Schematics.

    item_name

    string

    The name of the software that you chose to install from the IBM Cloud catalog.

    item_readme_url

    string

    The URL to the readme file of the software template in the IBM Cloud catalog.

    item_url

    string

    The URL to the software template in the IBM Cloud catalog.

    launch_url

    string

    The URL to the dashboard to access your software.

    offering_version

    string

    The version of the software template that you chose to install from the IBM Cloud catalog.

    service_extensions

    array

    Service Extensions

    description

    string

    The description of the workspace.

    dependencies

    Dependencies

    Workspace dependencies

    parents

    array

    List of workspace parents CRN identifiers

    children

    array

    List of workspace children CRN identifiers

    name

    string

    The name of the workspace.

    shared_data

    SharedTargetData

    Information about the Target used by the templates originating from the IBM Cloud catalog offerings. This information is not relevant for workspace created using your own Terraform template.

    cluster_created_on

    string

    Cluster created on.

    cluster_id

    string

    The ID of the cluster where you want to provision the resources of all IBM Cloud catalog templates that are included in the catalog offering.

    cluster_name

    string

    The cluster name.

    cluster_type

    string

    The cluster type.

    entitlement_keys

    array

    The entitlement key that you want to use to install IBM Cloud entitled software.

    namespace

    string

    The Kubernetes namespace or OpenShift project where the resources of all IBM Cloud catalog templates that are included in the catalog offering are deployed into.

    region

    string

    The IBM Cloud region that you want to use for the resources of all IBM Cloud catalog templates that are included in the catalog offering.

    resource_group_id

    string

    The ID of the resource group that you want to use for the resources of all IBM Cloud catalog templates that are included in the catalog offering.

    worker_count

    integer

    The cluster worker count.

    worker_machine_type

    string

    The cluster worker type.

    tags

    array

    A list of tags that you want to associate with your workspace.

    template_data

    array

    Input data for the Template

    template_repo

    TemplateRepoUpdateRequest

    Input to update the template repository data

    branch

    string

    The repository branch.

    release

    string

    The repository release.

    repo_sha_value

    string

    The repository SHA value.

    repo_url

    string

    The repository URL.

    url

    string

    The source URL.

    skip_submodules_checkout

    boolean

    Set this variable to checkout git sub-modules.

    type

    array

    List of Workspace type.

    workspace_status

    WorkspaceStatusUpdateRequest

    Input to update the workspace status.

    frozen

    boolean

    If set to true, the workspace is frozen and changes to the workspace are disabled.

    frozen_at

    string

    Frozen at

    frozen_by

    string

    Frozen by

    locked

    boolean

    Locked status

    locked_by

    string

    Locked by

    locked_time

    string

    Locked at

    workspace_status_msg

    WorkspaceStatusMessage

    Information about the last job that ran against the workspace. -

    status_code

    string

    The success or error code that was returned for the last plan, apply, or destroy job that ran against your workspace.

    status_msg

    string

    The success or error message that was returned for the last plan, apply, or destroy job that ran against your workspace.

    agent_id

    string

    agent id that process workspace jobs.

    settings

    array

    Input settings to be applied to the workspace, for example, `job_timeout_override`

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.

    Query Parameters

    Response

    200 - Successfully updated the workspace metadata.

    applied_shareddata_ids

    array

    List of applied shared dataset ID.

    catalog_ref

    CatalogRef

    Information about the software template that you chose from the IBM Cloud catalog. This information is returned for IBM Cloud catalog offerings only.

    created_at

    string

    The timestamp when the workspace was created.

    created_by

    string

    The user ID that created the workspace.

    crn

    string

    The workspace CRN.

    dependencies

    Dependencies

    Workspace dependencies

    description

    string

    The description of the workspace.

    id

    string

    The unique identifier of the workspace.

    last_health_check_at

    string

    The timestamp when the last health check was performed by Schematics.

    location

    string

    The IBM Cloud location where your workspace was provisioned.

    name

    string

    The name of the workspace.

    resource_group

    string

    The resource group the workspace was provisioned in.

    runtime_data

    array

    Information about the provisioning engine, state file, and runtime logs.

    shared_data

    SharedTargetDataResponse

    Information about the Target used by the templates originating from IBM Cloud catalog offerings. This information is not relevant when you create a workspace from your own Terraform template.

    status

    string

    The status of the workspace.

    **Active**: After you successfully ran your infrastructure code by applying your Terraform execution plan, the state of your workspace changes to &#x60;Active&#x60;. 
    
    **Connecting**: Schematics tries to connect to the template in your source repo. If successfully connected, the template is downloaded and metadata, such as input parameters, is extracted. After the template is downloaded, the state of the workspace changes to &#x60;Scanning&#x60;. 
    
    **Draft**: The workspace is created without a reference to a GitHub or GitLab repository. 
    
    **Failed**: If errors occur during the execution of your infrastructure code in IBM Cloud Schematics, your workspace status is set to &#x60;Failed&#x60;. 
    
    **Inactive**: The Terraform template was scanned successfully and the workspace creation is complete. You can now start running Schematics plan and apply jobs to provision the IBM Cloud resources that you specified in your template. If you have an &#x60;Active&#x60; workspace and decide to remove all your resources, your workspace is set to &#x60;Inactive&#x60; after all your resources are removed. 
    
    **In progress**: When you instruct IBM Cloud Schematics to run your infrastructure code by applying your Terraform execution plan, the status of our workspace changes to &#x60;In progress&#x60;. 
    
    **Scanning**: The download of the Terraform template is complete and vulnerability scanning started. If the scan is successful, the workspace state changes to &#x60;Inactive&#x60;. If errors in your template are found, the state changes to &#x60;Template Error&#x60;. 
    
    **Stopped**: The Schematics plan, apply, or destroy job was cancelled manually. 
    
    **Template Error**: The Schematics template contains errors and cannot be processed.
    

    tags

    array

    A list of tags that are associated with the workspace.

    template_data

    array

    Information about the Terraform or IBM Cloud software template that you want to use.

    template_ref

    string

    Workspace template reference.

    template_repo

    TemplateRepoResponse

    Information about the Template repository used by the workspace

    type

    array

    The Terraform version that was used to run your Terraform code.

    updated_at

    string

    The timestamp when the workspace was last updated.

    updated_by

    string

    The user ID that updated the workspace.

    cart_id

    string

    The associate cart order ID.

    project_id

    string

    The associate project ID.

    last_action_name

    string

    Name of the last Action performed on workspace.

    last_activity_id

    string

    ID of last Activity performed.

    last_job

    LastJob

    Last job details

    workspace_status

    WorkspaceStatusResponse

    Response that indicate the status of the workspace as either frozen or locked.

    workspace_status_msg

    WorkspaceStatusMessage

    Information about the last job that ran against the workspace. -

    agent

    AgentInfo

    Agent name, Agent id and associated policy ID information

    settings

    array

    Input settings to be applied to the workspace, for example, `job_timeout_override`

    git_token_ref

    string

    secrets manager reference to git token

    encryption

    EncryptionInfo

    Encryption details about the workspace such as scheme (byok/kyok) and key CRN.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The specified workspace could not be found. Verify that the workspace ID is correct. To list workspaces in your IBM Cloud account, use the `GET /v1/workspaces API`.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The workspace is frozen and disabled. Unfreeze the workspace first before you retry the request. Or the Schematics create, update, delete action has not completed. Wait until the create, update, delete, plan, apply, destroy or refresh action completes before you try again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    429 - Too many requests have been made within a time window. "IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The host can be `us-east`, `us-south`, `eu-gb`, or `eu-de` region". Wait before calling the API again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    503 - IBM Cloud Schematics could not process the request, due to a temporary overloading or maintenance. Try to reduce your request rate, or retry after a few minutes. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions. ">

    Update workspace

    PUT /v1/workspaces/{w_id}

    Use this API to update or replace the entire workspace, including the Terraform template (`template_repo`) or IBM Cloud catalog software template (`catalog_ref`) that your workspace points to.

    Tip:- If you want to update workspace metadata, use the `PATCH /v1/workspaces/{id}` API. To update workspace variables, use the `PUT /v1/workspaces/{id}/template_data/{template_id}/values` API.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.workspace.update

    Request

    Request Body

    WorkspaceUpdateRequest

    Replace the Workspace definition.

    catalog_ref

    CatalogRef

    Information about the software template that you chose from the IBM Cloud catalog. This information is returned for IBM Cloud catalog offerings only.

    dry_run

    boolean

    Dry run

    owning_account

    string

    Owning account ID of the catalog.

    item_icon_url

    string

    The URL to the icon of the software template in the IBM Cloud catalog.

    item_id

    string

    The ID of the software template that you chose to install from the IBM Cloud catalog. This software is provisioned with Schematics.

    item_name

    string

    The name of the software that you chose to install from the IBM Cloud catalog.

    item_readme_url

    string

    The URL to the readme file of the software template in the IBM Cloud catalog.

    item_url

    string

    The URL to the software template in the IBM Cloud catalog.

    launch_url

    string

    The URL to the dashboard to access your software.

    offering_version

    string

    The version of the software template that you chose to install from the IBM Cloud catalog.

    service_extensions

    array

    Service Extensions

    description

    string

    The description of the workspace.

    dependencies

    Dependencies

    Workspace dependencies

    parents

    array

    List of workspace parents CRN identifiers

    children

    array

    List of workspace children CRN identifiers

    name

    string

    The name of the workspace.

    shared_data

    SharedTargetData

    Information about the Target used by the templates originating from the IBM Cloud catalog offerings. This information is not relevant for workspace created using your own Terraform template.

    cluster_created_on

    string

    Cluster created on.

    cluster_id

    string

    The ID of the cluster where you want to provision the resources of all IBM Cloud catalog templates that are included in the catalog offering.

    cluster_name

    string

    The cluster name.

    cluster_type

    string

    The cluster type.

    entitlement_keys

    array

    The entitlement key that you want to use to install IBM Cloud entitled software.

    namespace

    string

    The Kubernetes namespace or OpenShift project where the resources of all IBM Cloud catalog templates that are included in the catalog offering are deployed into.

    region

    string

    The IBM Cloud region that you want to use for the resources of all IBM Cloud catalog templates that are included in the catalog offering.

    resource_group_id

    string

    The ID of the resource group that you want to use for the resources of all IBM Cloud catalog templates that are included in the catalog offering.

    worker_count

    integer

    The cluster worker count.

    worker_machine_type

    string

    The cluster worker type.

    tags

    array

    A list of tags that you want to associate with your workspace.

    template_data

    array

    Input data for the Template

    template_repo

    TemplateRepoUpdateRequest

    Input to update the template repository data

    branch

    string

    The repository branch.

    release

    string

    The repository release.

    repo_sha_value

    string

    The repository SHA value.

    repo_url

    string

    The repository URL.

    url

    string

    The source URL.

    skip_submodules_checkout

    boolean

    Set this variable to checkout git sub-modules.

    type

    array

    List of Workspace type.

    workspace_status

    WorkspaceStatusUpdateRequest

    Input to update the workspace status.

    frozen

    boolean

    If set to true, the workspace is frozen and changes to the workspace are disabled.

    frozen_at

    string

    Frozen at

    frozen_by

    string

    Frozen by

    locked

    boolean

    Locked status

    locked_by

    string

    Locked by

    locked_time

    string

    Locked at

    workspace_status_msg

    WorkspaceStatusMessage

    Information about the last job that ran against the workspace. -

    status_code

    string

    The success or error code that was returned for the last plan, apply, or destroy job that ran against your workspace.

    status_msg

    string

    The success or error message that was returned for the last plan, apply, or destroy job that ran against your workspace.

    agent_id

    string

    agent id that process workspace jobs.

    settings

    array

    Input settings to be applied to the workspace, for example, `job_timeout_override`

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.

    Query Parameters

    Response

    200 - Successfully updated the workspace metadata.

    applied_shareddata_ids

    array

    List of applied shared dataset ID.

    catalog_ref

    CatalogRef

    Information about the software template that you chose from the IBM Cloud catalog. This information is returned for IBM Cloud catalog offerings only.

    created_at

    string

    The timestamp when the workspace was created.

    created_by

    string

    The user ID that created the workspace.

    crn

    string

    The workspace CRN.

    dependencies

    Dependencies

    Workspace dependencies

    description

    string

    The description of the workspace.

    id

    string

    The unique identifier of the workspace.

    last_health_check_at

    string

    The timestamp when the last health check was performed by Schematics.

    location

    string

    The IBM Cloud location where your workspace was provisioned.

    name

    string

    The name of the workspace.

    resource_group

    string

    The resource group the workspace was provisioned in.

    runtime_data

    array

    Information about the provisioning engine, state file, and runtime logs.

    shared_data

    SharedTargetDataResponse

    Information about the Target used by the templates originating from IBM Cloud catalog offerings. This information is not relevant when you create a workspace from your own Terraform template.

    status

    string

    The status of the workspace.

    **Active**: After you successfully ran your infrastructure code by applying your Terraform execution plan, the state of your workspace changes to &#x60;Active&#x60;. 
    
    **Connecting**: Schematics tries to connect to the template in your source repo. If successfully connected, the template is downloaded and metadata, such as input parameters, is extracted. After the template is downloaded, the state of the workspace changes to &#x60;Scanning&#x60;. 
    
    **Draft**: The workspace is created without a reference to a GitHub or GitLab repository. 
    
    **Failed**: If errors occur during the execution of your infrastructure code in IBM Cloud Schematics, your workspace status is set to &#x60;Failed&#x60;. 
    
    **Inactive**: The Terraform template was scanned successfully and the workspace creation is complete. You can now start running Schematics plan and apply jobs to provision the IBM Cloud resources that you specified in your template. If you have an &#x60;Active&#x60; workspace and decide to remove all your resources, your workspace is set to &#x60;Inactive&#x60; after all your resources are removed. 
    
    **In progress**: When you instruct IBM Cloud Schematics to run your infrastructure code by applying your Terraform execution plan, the status of our workspace changes to &#x60;In progress&#x60;. 
    
    **Scanning**: The download of the Terraform template is complete and vulnerability scanning started. If the scan is successful, the workspace state changes to &#x60;Inactive&#x60;. If errors in your template are found, the state changes to &#x60;Template Error&#x60;. 
    
    **Stopped**: The Schematics plan, apply, or destroy job was cancelled manually. 
    
    **Template Error**: The Schematics template contains errors and cannot be processed.
    

    tags

    array

    A list of tags that are associated with the workspace.

    template_data

    array

    Information about the Terraform or IBM Cloud software template that you want to use.

    template_ref

    string

    Workspace template reference.

    template_repo

    TemplateRepoResponse

    Information about the Template repository used by the workspace

    type

    array

    The Terraform version that was used to run your Terraform code.

    updated_at

    string

    The timestamp when the workspace was last updated.

    updated_by

    string

    The user ID that updated the workspace.

    cart_id

    string

    The associate cart order ID.

    project_id

    string

    The associate project ID.

    last_action_name

    string

    Name of the last Action performed on workspace.

    last_activity_id

    string

    ID of last Activity performed.

    last_job

    LastJob

    Last job details

    workspace_status

    WorkspaceStatusResponse

    Response that indicate the status of the workspace as either frozen or locked.

    workspace_status_msg

    WorkspaceStatusMessage

    Information about the last job that ran against the workspace. -

    agent

    AgentInfo

    Agent name, Agent id and associated policy ID information

    settings

    array

    Input settings to be applied to the workspace, for example, `job_timeout_override`

    git_token_ref

    string

    secrets manager reference to git token

    encryption

    EncryptionInfo

    Encryption details about the workspace such as scheme (byok/kyok) and key CRN.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The specified workspace could not be found. Verify that the workspace ID is correct. To list workspaces in your IBM Cloud account, use the `GET /v1/workspaces API`.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The workspace is frozen and disabled. Unfreeze the workspace first before you retry the request. Or the Schematics create, update, delete action has not completed. Wait until the create, update, delete, plan, apply, destroy or refresh action completes before you try again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    429 - Too many requests have been made within a time window. "IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The host can be `us-east`, `us-south`, `eu-gb`, or `eu-de` region". Wait before calling the API again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    503 - IBM Cloud Schematics could not process the request, due to a temporary overloading or maintenance. Try to reduce your request rate, or retry after a few minutes. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Show workspace template readme

    GET /v1/workspaces/{w_id}/templates/readme

    Retrieve the `README.md` file of the Terraform of IBM Cloud catalog template that your workspace points to.

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.

    Query Parameters

    ref

    string

    The GitHub or GitLab branch where the `README.md` file is stored, or the commit ID or tag that references the `README.md` file that you want to retrieve. If you do not specify this option, the `README.md` file is retrieved from the master branch by default.

    formatted

    string

    The format of the readme file. Value ''markdown'' will give markdown, otherwise html

    Response

    200 - Successfully retrieved the README.md of the template that your workspace points to.

    readme

    string

    The `README.md` file for the template used by the workspace

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Upload a TAR file to your workspace

    PUT /v1/workspaces/{w_id}/template_data/{t_id}/template_repo_upload

    Provide your Terraform template by uploading a TAR file from your local machine. Before you use this API, you must create a workspace without a link to a GitHub or GitLab repository with the `POST /v1/workspaces` API.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.workspace.update

    Request

    Request Body

    Upload template tar file

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace where you want to upload your `.tar` file. To find the workspace ID, use the `GET /v1/workspaces` API.

    t_id

    Required *

    string

    The ID of the Terraform template in your workspace. When you create a workspace, a unique ID is assigned to your Terraform template, even if no template was provided during workspace creation. To find this ID, use the `GET /v1/workspaces` API and review the `template_data.id` value.

    Query Parameters

    Response

    200 - Successfully uploaded the TAR file to your workspace.

    file_value

    string

    Tar file value.

    has_received_file

    boolean

    Has received tar file?

    id

    string

    Template ID

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The specified workspace could not be found. Verify that the workspace ID is correct. To list workspaces in your IBM Cloud account, use the `GET /v1/workspaces API`.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    429 - Too many requests have been made within a time window. "IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The host can be `us-east`, `us-south`, `eu-gb`, or `eu-de` region". Wait before calling the API again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    List workspace jobs

    GET /v1/workspaces/{w_id}/actions

    Retrieve a list of all jobs that ran against a workspace. Jobs are generated when you use the `apply`, `plan`, `destroy`, and `refresh`, command API.

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.

    Query Parameters

    offset

    integer

    The starting position of the item in the list of items. For example, if you have three workspaces in your account, the first workspace is assigned position number 0, the second workspace is assigned position number 1, and so forth. If you have 6 workspaces and you want to list the details for workspaces `2-6`, enter 1. To limit the number of workspaces that is returned, use the `limit` option in addition to the `offset` option. Negative numbers are not supported and are ignored.

    limit

    integer

    The maximum number of items that you want to list. The number must be a positive integer between 1 and 2000. If no value is provided, 100 is used by default.

    Response

    200 - Successfully retrieved list of workspace jobs.

    actions

    array

    List of workspace jobs

    workspace_id

    string

    The ID of the workspace.

    workspace_name

    string

    The name of the workspace.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Stop the workspace job

    DELETE /v1/workspaces/{w_id}/actions/{activity_id}

    Stop an ongoing schematics job that runs against your workspace. Note: If you remove the Schematics apply job that runs against your workspace, any changes to your IBM Cloud resources that are already applied are not reverted. If a creation, update, or deletion is currently in progress, Schematics waits for the job to be completed first. Then, any other resource creations, updates, or deletions that are included in your Terraform template file are ignored. <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.

    activity_id

    Required *

    string

    The ID of the activity or job, for which you want to retrieve details. To find the job ID, use the `GET /v1/workspaces/{id}/actions` API.

    Query Parameters

    Response

    202 - Successfully initiated the stopping of workspace job.

    activityid

    string

    The ID of the activity or job that was created when you initiated a request to `apply` a Terraform template. You can use the ID to retrieve log file by using the `GET /v1/workspaces/{id}/actions/{action_id}/logs` API.

    400 - The specified action cannot be stopped because the job completed successfully or a user in the account already requested to stop this action. Use the `GET /v1/workspace/{id}/actions` API to find the details for your job.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The requested workspace or job cannot be located. Check that you have the correct workspace ID and job IDs in your request.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The specified resource is marked as frozen. Unfreeze the resource before you retry the request.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Get workspace job details

    GET /v1/workspaces/{w_id}/actions/{activity_id}

    Get the details for a workspace job that ran against the workspace. This API returns the job status and a URL to the log file that you can retrieve by using the `GET /v1/workspaces/{id}/actions/{action_id}/logs` API.

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.

    activity_id

    Required *

    string

    The ID of the activity or job, for which you want to retrieve details. To find the job ID, use the `GET /v1/workspaces/{id}/actions` API.

    Query Parameters

    Response

    200 - Successfully retrieved the workspace jobs details.

    action_id

    string

    The ID of the activity or job. You can use the ID to retrieve the logs for that job by using the `GET /v1/workspaces/{id}/actions/{action_id}/logs` API.

    message

    array

    Information about the success or failure of your job, including a success or error code and the timestamp when the job succeeded or failed.

    name

    string

    The type of actovoty or job that ran against your workspace.

    • APPLY: The apply job was created when you used the `PUT /v1/workspaces/{id}/apply` API to apply a Terraform template in IBM Cloud.
    • DESTROY: The destroy job was created when you used the `DELETE /v1/workspaces/{id}/destroy` API to remove all resources that are associated with your workspace.
    • PLAN: The plan job was created when you used the `POST /v1/workspaces/{id}/plan` API to create a Terraform execution plan.

    performed_at

    string

    The timestamp when the job was initiated.

    performed_by

    string

    The user ID who initiated the job.

    status

    string

    The status of your activity or job. To retrieve the URL to your job logs, use the GET /v1/workspaces/{id}/actions/{action_id}/logs API.

    • COMPLETED: The job completed successfully.
    • CREATED: The job was created, but the provisioning, modification, or removal of IBM Cloud resources has not started yet.
    • FAILED: An error occurred during the plan, apply, or destroy job. Use the job ID to retrieve the URL to the log files for your job.
    • IN PROGRESS: The job is in progress. You can use the log_url to access the logs.

    templates

    array

    List of template activities

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The requested workspace or job cannot be located. Check that you have the correct workspace ID and job IDs in your request.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Run Terraform Commands

    PUT /v1/workspaces/{w_id}/commands

    Run Terraform state commands to modify the workspace state file, by using the IBM Cloud Schematics API.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Request Body

    TerraformCommands

    command value

    commands

    array

    List of commands. You can execute single set of commands or multiple commands. For more information, about the payload of the multiple commands, refer to Commands.

    operation_name

    string

    Command name

    description

    string

    Command description

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.

    Query Parameters

    Response

    200 - Successfully updated the workspace metadata.

    activityid

    string

    The ID of the job that was created when you initiated a request to `apply` a Terraform template. You can use the ID to retrieve log file by using the `GET /v1/workspaces/{id}/actions/{action_id}/logs` API.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The specified workspace could not be found. Verify that the workspace ID is correct. To list workspaces in your IBM Cloud account, use the `GET /v1/workspaces API`.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - Workspace Command failed. The workspace is marked as frozen. Unfreeze the workspace before you retry the request.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    429 - Too many requests have been made within a time window. "IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The host can be `us-east`, `us-south`, `eu-gb`, or `eu-de` region". Wait before calling the API again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    503 - IBM Cloud Schematics could not process the request, due to a temporary overloading or maintenance. Try to reduce your request rate, or retry after a few minutes. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    persisted

    to determine what resources exist in your IBM Cloud account.

    Note: This API returns an activity or job ID that you use to retrieve the

    log URL with the `GET /v1/workspaces/{id}/actions/{action_id}/logs` API.

    Important: Applying a template might incur costs. Make sure to review the pricing information for the resources that you specified in your templates before you apply the template in IBM Cloud. To find a summary of job that Schematics is about to perform, create a Terraform execution plan with the `POST /v1/workspaces/{id}/plan` API.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.">

    Perform a Schematics `apply` job

    PUT /v1/workspaces/{w_id}/apply

    Run a Schematics `apply` job against your workspace. An `apply` job provisions, modifies, or removes the IBM Cloud resources that you described in the Terraform template that your workspace points to. Depending on the type and number of resources that you want to provision or modify, this process might take a few minutes, or even up to hours to complete. During this time, you cannot make changes to your workspace. After all updates are applied, the state of the files is persisted to determine what resources exist in your IBM Cloud account.

    Important: Your workspace must be in an `Inactive`, `Active`, `Failed`, or `Stopped` state to perform a Schematics `apply` job. After all updates are applied, the state of the files is persisted

    to determine what resources exist in your IBM Cloud account.

    Note: This API returns an activity or job ID that you use to retrieve the

    log URL with the `GET /v1/workspaces/{id}/actions/{action_id}/logs` API.

    Important: Applying a template might incur costs. Make sure to review the pricing information for the resources that you specified in your templates before you apply the template in IBM Cloud. To find a summary of job that Schematics is about to perform, create a Terraform execution plan with the `POST /v1/workspaces/{id}/plan` API.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.workspace-resources.create

    Request

    Request Body

    WorkspaceActivityOptions

    Workspace 'apply' job options

    action_options

    WorkspaceActivityOptionsTemplate

    Workspace job options template

    target

    array

    A list of Terraform resources to target.

    tf_vars

    array

    Terraform variables for the workspace job options.

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace for which you want to run a Schematics `apply` job. To find the workspace ID, use the `GET /workspaces` API.

    Query Parameters

    Response

    202 - Successfully ran a Schematics `apply` job against your workspace.

    activityid

    string

    The ID of the activity or job that was created when you initiated a request to `apply` a Terraform template. You can use the ID to retrieve log file by using the `GET /v1/workspaces/{id}/actions/{action_id}/logs` API.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The specified workspace could not be found. Verify that the workspace ID is correct. To list workspaces in your IBM Cloud account, use the `GET /v1/workspaces API`.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - Apply failed. Could not perform an `apply` job against the workspace. The workspace is frozen, or a Schematics create, update, `plan`, `apply`, `destroy`, delete, or `refresh` job has not completed yet. Unfreeze the workspace first or wait until the create, update, `plan`, `apply`, `destroy`, delete, or `refresh` job completes before you try again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    429 - Too many requests have been made within a time window. "IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The host can be `us-east`, `us-south`, `eu-gb`, or `eu-de` region". Wait before calling the API again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    503 - IBM Cloud Schematics could not process the request, due to a temporary overloading or maintenance. Try to reduce your request rate, or retry after a few minutes. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Perform a Schematics `destroy` job

    PUT /v1/workspaces/{w_id}/destroy

    Run a Schematics `destroy` job against your workspace. A `destroy` job removes all IBM Cloud resources that are associated with your workspace. Removing your resources does not delete the Schematics workspace. To delete the workspace, use the `DELETE /v1/workspaces/{id}` API. This API returns an activity or job ID that you use to retrieve the URL to the log file with the `GET /v1/workspaces/{id}/actions/{action_id}/logs` API.

    Important: Your workspace must be in an `Active`, `Failed`, or `Stopped` state to perform a Schematics `destroy` job.

    Note: Deleting IBM Cloud resources cannot be undone. Make sure that you back up any required data before you remove your resources.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.workspace-resources.delete

    Request

    Request Body

    WorkspaceActivityOptions

    Workspace destroy command options

    action_options

    WorkspaceActivityOptionsTemplate

    Workspace job options template

    target

    array

    A list of Terraform resources to target.

    tf_vars

    array

    Terraform variables for the workspace job options.

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace for which you want to perform a Schematics `destroy` job. To find the workspace ID, use the `GET /workspaces` API.

    Query Parameters

    Response

    202 - Successfully initiated a Schematics `destroy` job against your workspace.

    activityid

    string

    The ID of the activity or job that was created when you initiated a request to `destroy` a Terraform template. You can use the ID to retrieve log file by using the `GET /v1/workspaces/{id}/actions/{action_id}/logs` API.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The requested workspace cannot be located. Check that you have the correct workspace ID in your request. Or the requested state-file cannot be located. Run apply action to create a state-file.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - Could not perform a `destroy` job against the workspace. The workspace is frozen, or a Schematics create, update, `plan`, `apply`, delete, `destroy`, or `refresh` job has not completed yet. Unfreeze the workspace first or wait until the create, update, `plan`, `apply`, delete, `destroy`, or `refresh` job completes before you try again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    429 - Too many requests have been made within a time window. "IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The host can be `us-east`, `us-south`, `eu-gb`, or `eu-de` region". Wait before calling the API again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    503 - IBM Cloud Schematics could not process the request, due to a temporary overloading or maintenance. Try to reduce your request rate, or retry after a few minutes. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Perform a Schematics `plan` job

    POST /v1/workspaces/{w_id}/plan

    Run a Schematics `plan` job against your workspace. The `plan` job creates a summary of IBM Cloud resources that must be created, modified, or deleted to achieve the state that is described in the Terraform or IBM Cloud catalog template that your workspace points to. During this time, you cannot make changes to your workspace. You can use the summary to verify your changes before you apply the template in IBM Cloud.

    Important: Your workspace must be in an `Inactive`, `Active`, `Failed`, or `Stopped` state to perform a Schematics `plan` job.

    Note: This API returns an activity or job ID that you use to retrieve the URL to the log file with the `GET /v1/workspaces/{id}/actions/{action_id}/logs` API.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.workspace-resources.plan

    Request

    Request Body

    WorkspaceActivityOptions

    Workspace 'plan' job options

    action_options

    WorkspaceActivityOptionsTemplate

    Workspace job options template

    target

    array

    A list of Terraform resources to target.

    tf_vars

    array

    Terraform variables for the workspace job options.

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace, for which you want to run a Schematics `plan` job. To find the ID of your workspace, use the `GET /v1/workspaces` API.

    Query Parameters

    Response

    202 - Successfully performed a Schematics `plan` job.

    activityid

    string

    The ID of the activity or job that was created when you initiated a request to `plan` a Terraform template. You can use the ID to retrieve log file by using the `GET /v1/workspaces/{id}/actions/{action_id}/logs` API.

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The specified workspace could not be found. Verify that the workspace ID is correct. To list workspaces in your IBM Cloud account, use the `GET /v1/workspaces API`.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The workspace is frozen and disabled. Unfreeze the workspace first before you retry the request. Or the Schematics create, update, delete action has not completed. Wait until the create, update, delete, plan, apply, destroy or refresh action completes before you try again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    503 - IBM Cloud Schematics could not process the request, due to a temporary overloading or maintenance. Try to reduce your request rate, or retry after a few minutes. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Perform a Schematics `refresh` job

    PUT /v1/workspaces/{w_id}/refresh

    Run a Schematics `refresh` job against your workspace. A `refresh` job validates the IBM Cloud resources in your account against the state that is stored in the Terraform statefile of your workspace. If differences are found, the Terraform statefile is updated accordingly. This API returns an activity or job ID that you use to retrieve the URL to the log file with the `GET /v1/workspaces/{id}/actions/{action_id}/logs` API.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.workspace.refresh

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace, for which you want to run a Schematics `refresh` job. To find the ID of your workspace, use the `GET /v1/workspaces` API.

    Query Parameters

    Response

    202 - Successfully initiated a Schematics `refresh` job against your workspace.

    activityid

    string

    The ID of the activity or job that was created for your workspace `refresh` activity or job. You can use the ID to retrieve the log file by using the `GET /v1/workspaces/{id}/actions/{action_id}/logs` API.

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The specified workspace could not be found. Verify that the workspace ID is correct. To list workspaces in your IBM Cloud account, use the `GET /v1/workspaces API`.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - Could not perform a `refresh` job against the workspace. The workspace is frozen, or a Schematics create, update, `plan`, `apply`, delete, `destroy`, or `refresh` job has not completed yet. Unfreeze the workspace first or wait until the create, update, `plan`, `apply`, delete, `destroy`, or `refresh` job completes before you try again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    List workspace input variables

    GET /v1/workspaces/{w_id}/template_data/{t_id}/values

    Retrieve a list of input variables that are declared in your Terraform or IBM Cloud catalog template.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.workspace.template_values

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.

    t_id

    Required *

    string

    The ID of the Terraform template in your workspace. When you create a workspace, the Terraform template that your workspace points to is assigned a unique ID. Use the `GET /v1/workspaces` to look up the workspace IDs and template IDs or `template_data.id` in your IBM Cloud account.

    Query Parameters

    Response

    200 - Successfully retrieved a list of input variables that are declared in your template.

    values_metadata

    array

    Information about workspace variable metadata.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The requested workspace cannot be located. Check that you have the correct workspace ID in your request. Or the requested workspace/template could not be located. Check that you have the correct template ID in your request.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Replace workspace input variables

    PUT /v1/workspaces/{w_id}/template_data/{t_id}/values

    Replace or Update the input variables for the template that your workspace points to.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.workspace.template_values

    Request

    Request Body

    UserValuesRequest

    Replace a Workspace input values

    env_values

    array

    A list of environment variables that you want to apply during the execution of a bash script or Terraform job. This field must be provided as a list of key-value pairs, for example, TF_LOG=debug. Each entry will be a map with one entry where `key is the environment variable name and value is value`. You can define environment variables for IBM Cloud catalog offerings that are provisioned by using a bash script. See example to use special environment variable that are supported by Schematics.

    values

    string

    User values

    variablestore

    array

    VariablesRequest -

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.

    t_id

    Required *

    string

    The ID of the Terraform template in your workspace. When you create a workspace, the Terraform template that your workspace points to is assigned a unique ID. Use the `GET /v1/workspaces` to look up the workspace IDs and template IDs or `template_data.id` in your IBM Cloud account.

    Query Parameters

    Response

    200 - Successfully updated input variables for the template that your workspace points to.

    env_values

    array

    A list of environment variables that you want to apply during the execution of a bash script or Terraform job. This field must be provided as a list of key-value pairs, for example, TF_LOG=debug. Each entry will be a map with one entry where `key is the environment variable name and value is value`. You can define environment variables for IBM Cloud catalog offerings that are provisioned by using a bash script. See example to use special environment variable that are supported by Schematics.

    env_values_map

    array

    A list of environment variables that you want to apply during the execution of a bash script or Terraform job. This field must be provided as a list of key-value pairs, for example, TF_LOG=debug. Each entry will be a map with one entry where `key is the environment variable name and value is value`. You can define environment variables for IBM Cloud catalog offerings that are provisioned by using a bash script. See example to use special environment variable that are supported by Schematics.

    values

    string

    User values

    variablestore

    array

    Information about the input variables that your template uses.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The requested workspace cannot be located. Check that you have the correct workspace ID in your request. Or the requested workspace/template could not be located. Check that you have the correct template ID in your request.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Get workspace template details

    GET /v1/workspaces/{w_id}/templates/values

    Retrieve detailed information about the Terraform template that your workspace points to.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.workspace.template_metadata_values

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace for which you want to retrieve input parameters and values. To find the workspace ID, use the `GET /workspaces` API.

    Query Parameters

    Response

    200 - Successfully retrieved details about the Terraform template that your workspace points to.

    runtime_data

    array

    Information about the provisioning engine, state file, and runtime logs.

    shared_data

    SharedTargetData

    Information about the Target used by the templates originating from the IBM Cloud catalog offerings. This information is not relevant for workspace created using your own Terraform template.

    template_data

    array

    Information about the input variables that are used in the template.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The requested workspace cannot be located. Check that you have the correct workspace ID in your request. Or the requested workspace/template could not be located. Check that you have the correct template ID in your request.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    List workspace variable metadata

    GET /v2/workspaces/{w_id}/template_data/{t_id}/values_metadata

    Retrieve the metadata for all the workspace input variables that are declared in the template that your workspace points to.

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace for which you want to retrieve the metadata of the input variables that are declared in the template. To find the workspace ID, use the `GET /v1/workspaces` API.

    t_id

    Required *

    string

    The ID of the Terraform template for which you want to retrieve the metadata of your input variables. When you create a workspace, the Terraform template that your workspace points to is assigned a unique ID. To find this ID, use the `GET /v1/workspaces` API and review the `template_data.id` value.

    Query Parameters

    Response

    200 - Successfully retrieved the metadata of the input variables for the template that your workspace points to.

    values_metadata

    array

    List of variable metadata

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The requested workspace cannot be located. Check that you have the correct workspace ID in your request. Or the requested workspace/template could not be located. Check that you have the correct template ID in your request.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    List workspace variable metadata

    GET /v1/workspaces/{w_id}/template_data/{t_id}/values_metadata

    Deprecated: This v1 API will be decommissioned within 12 months. Please migrate to the v2 API: `GET /v2/workspaces/{w_id}/template_data/{t_id}/values_metadata`. Retrieve the metadata for all the workspace input variables that are declared in the template that your workspace points to.

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace for which you want to retrieve the metadata of the input variables that are declared in the template. To find the workspace ID, use the `GET /v1/workspaces` API.

    t_id

    Required *

    string

    The ID of the Terraform template for which you want to retrieve the metadata of your input variables. When you create a workspace, the Terraform template that your workspace points to is assigned a unique ID. To find this ID, use the `GET /v1/workspaces` API and review the `template_data.id` value.

    Query Parameters

    Response

    200 - Successfully retrieved the metadata of the input variables for the template that your workspace points to.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The requested workspace cannot be located. Check that you have the correct workspace ID in your request. Or the requested workspace/template could not be located. Check that you have the correct template ID in your request.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    List workspace output values

    GET /v2/workspaces/{w_id}/output_values

    Retrieve a list of Terraform output variables. You define output values in your Terraform template to include information that you want to make accessible for other Terraform templates.

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace for which you want to retrieve output parameters and values. To find the workspace ID, use the `GET /workspaces` API.

    Query Parameters

    Response

    200 - Successfully retrieved the output values in JSON format.

    id

    string

    The ID that was assigned to your Terraform template or IBM Cloud catalog software template

    folder

    string

    The subfolder in the GitHub or GitLab repository where your Terraform template is stored. If the template is stored in the root directory, `.` is returned.

    type

    string

    The Terraform version that was used to apply your template

    values

    array

    A list of Terraform output values

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The requested workspace cannot be located. Check that you have the correct workspace ID in your request. Or the requested workspace/template could not be located. Check that you have the correct template ID in your request.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    List workspace output values

    GET /v1/workspaces/{w_id}/output_values

    Deprecated: This v1 API will be decommissioned within 12 months. Please migrate to the v2 API: `GET /v2/workspaces/{w_id}/output_values`. Retrieve a list of Terraform output variables. You define output values in your Terraform template to include information that you want to make accessible for other Terraform templates.

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace for which you want to retrieve output parameters and values. To find the workspace ID, use the `GET /workspaces` API.

    Query Parameters

    Response

    200 - Successfully retrieved the output values in JSON format.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The requested workspace cannot be located. Check that you have the correct workspace ID in your request. Or the requested workspace/template could not be located. Check that you have the correct template ID in your request.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    List workspace resources

    GET /v2/workspaces/{w_id}/resources

    Retrieve a list of IBM Cloud resources that you created with your workspace.

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.

    Query Parameters

    Response

    200 - Successfully retrieved the resources in JSON format.

    id

    string

    The ID that was assigned to your Terraform template or IBM Cloud catalog software template

    folder

    string

    The subfolder in GitHub or GitLab where your Terraform templates are stored. If your template is stored in the root directory, `.` is returned.

    type

    string

    The Terraform version that was used to apply your template

    generated_at

    string

    Timestamp when the terraform resource information was last generated

    resources

    array

    Information about the IBM Cloud resources that are associated with your workspace

    null_resources

    array

    List of null resources

    resources_count

    integer

    Total count of resources provisioned

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified workspace or template could not be found. Verify that you entered the correct workspace and template ID. To find the workspace and template ID, use the `GET /v1/workspaces` API.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    List workspace resources

    GET /v1/workspaces/{w_id}/resources

    Deprecated: This v1 API will be decommissioned within 12 months. Please migrate to the v2 API: `GET /v2/workspaces/{w_id}/resources`. Retrieve a list of IBM Cloud resources that you created with your workspace.

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.

    Query Parameters

    Response

    200 - Successfully retrieved the resources in JSON format.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified workspace or template could not be found. Verify that you entered the correct workspace and template ID. To find the workspace and template ID, use the `GET /v1/workspaces` API.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Get Terraform statefile URL

    GET /v1/workspaces/{w_id}/state_stores

    This API is deprecated, and is replaced by the `GET /v2/jobs/{job_id}/files`, with `file_type` equal `state_file`. Retrieve the URL to the Terraform statefile (`terraform.tfstate`). You use the URL to access the Terraform statefile. The Terraform statefile includes detailed information about the IBM Cloud resources that you provisioned with IBM Cloud Schematics and Schematics uses the file to determine future create, modify, or delete actions for your resources. To show the content of the Terraform statefile, use the `GET /v1/workspaces/{id}/runtime_data/{template_id}/state_store` API.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.workspace.template_state_stores

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace for which you want to retrieve the Terraform statefile. To find the workspace ID, use the `GET /v1/workspaces` API.

    Query Parameters

    Response

    200 - Successfully retrieved the URL to the Terraform statefile.

    runtime_data

    array

    Information about workspace runtime data.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified workspace or template could not be found. Verify that you entered the correct workspace and template ID. To find the workspace and template ID, use the `GET /v1/workspaces` API.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Show Terraform statefile content

    GET /v1/workspaces/{w_id}/runtime_data/{t_id}/state_store

    This API is deprecated, and is replaced by the `GET /v2/jobs/{job_id}/files`, with `file_type` equal `state_file`. Show the content of the Terraform statefile (`terraform.tfstate`) that was created when your Terraform template was applied in IBM Cloud. The statefile holds detailed information about the IBM Cloud resources that were created by IBM Cloud Schematics and Schematics uses the file to determine future create, modify, or delete actions for your resources.

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace for which you want to retrieve the Terraform statefile. To find the workspace ID, use the `GET /v1/workspaces` API.

    t_id

    Required *

    string

    The ID of the Terraform template for which you want to retrieve the Terraform statefile. When you create a workspace, the Terraform template that your workspace points to is assigned a unique ID. To find this ID, use the `GET /v1/workspaces` API and review the template_data.id value.

    Query Parameters

    Response

    200 - Successfully retrieved the information from the Terraform statefile.

    version

    number

    The version of the state file format.

    terraform_version

    string

    The Terraform version that was used to apply your template.

    serial

    number

    serial number

    lineage

    string

    lineage

    modules

    array

    modules

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified workspace or template could not be found. Verify that you entered the correct workspace and template ID. To find the workspace and template ID, use the `GET /v1/workspaces` API.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Get workspace job log URL

    GET /v1/workspaces/{w_id}/actions/{activity_id}/logs

    Get the Terraform log file URL for a workspace job. You can retrieve the log URL for jobs that were created with the `PUT /v1/workspaces/{id}/apply`, `POST /v1/workspaces/{id}/plan`, or `DELETE /v1/workspaces/{id}/destroy` API.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.workspace.log_stores

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace for which you want to retrieve the Terraform statefile. To find the workspace ID, use the `GET /v1/workspaces` API.

    activity_id

    Required *

    string

    The ID of the activity or job, for which you want to retrieve details. To find the job ID, use the `GET /v1/workspaces/{id}/actions` API.

    Query Parameters

    Response

    200 - Successfully retrieved the log file URL for your job.

    action_id

    string

    The ID of the activity or job that ran against your workspace.

    name

    string

    The type of actovoty or job that ran against your workspace.

    • APPLY: The apply job was created when you used the `PUT /v1/workspaces/{id}/apply` API to apply a Terraform template in IBM Cloud.
    • DESTROY: The destroy job was created when you used the `DELETE /v1/workspaces/{id}/destroy` API to remove all resources that are associated with your workspace.
    • PLAN: The plan job was created when you used the `POST /v1/workspaces/{id}/plan` API to create a Terraform execution plan.

    templates

    array

    List of templates in the workspace

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified workspace or action could not be found. Verify that you entered the correct workspace and action ID. To find the ID of your workspace, use the `GET /v1/workspaces` API. To find the ID of the action, use the `GET /v1/workspaces/{id}/actions` API.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Get latest workspace job log URL for all workspace templates

    GET /v1/workspaces/{w_id}/log_stores

    Retrieve the log file URL for the latest job of a template that ran against your workspace. You use this URL to retrieve detailed logs for the latest job.

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.

    Query Parameters

    Response

    200 - Successfully retrieved the log URL for the most recent job that ran against your workspace.

    runtime_data

    array

    Runtime data

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified workspace or template could not be found. Verify that you entered the correct workspace and template ID. To find the workspace and template ID, use the `GET /v1/workspaces` API.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Show latest logs for a workspace template

    GET /v1/workspaces/{w_id}/runtime_data/{t_id}/log_store

    Show the Terraform logs for the most recent job of a template that ran against your workspace.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.workspace.state_stores

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.

    t_id

    Required *

    string

    The ID of the Terraform template or IBM Cloud catalog software template in the workspace. Use the `GET /v1/workspaces` to look up the workspace IDs and template IDs or `template_data.id`

    Query Parameters

    log_tf_cmd

    boolean

    Enter false to replace the first line in each Terraform command section, such as Terraform INIT or Terraform PLAN, with Schematics INIT (Schematics PLAN) in your log output. In addition, the log lines Starting command: terraform init -input=false -no-color and Starting command: terraform apply -state=terraform.tfstate -var-file=schematics.tfvars -auto-approve -no-color are suppressed. All subsequent command lines still use the Terraform command prefix. To remove this prefix, use the log_tf_prefix option.

    log_tf_prefix

    boolean

    `false` will hide all the terraform command prefix in the log statements

    log_tf_null_resource

    boolean

    `false` will hide all the null resource prefix in the log statements

    log_tf_ansible

    boolean

    `true` will format all logs to withhold the original format of ansible output in the log statements

    Response

    200 - Successfully retrieved the Terraform logs for the most recent workspace job.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified workspace or template could not be found. Verify that you entered the correct workspace and template ID. To find the workspace and template ID, use the `GET /v1/workspaces` API.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Show logs for a workspace job

    GET /v1/workspaces/{w_id}/runtime_data/{t_id}/log_store/actions/{activity_id}

    Show the Terraform logs for an job that ran against your workspace.

    Request

    Path Parameters

    w_id

    Required *

    string

    The ID of the workspace. To find the workspace ID, use the `GET /v1/workspaces` API.

    t_id

    Required *

    string

    The ID of the Terraform template or IBM Cloud catalog software template in the workspace. Use the `GET /v1/workspaces` to look up the workspace IDs and template IDs or `template_data.id`

    activity_id

    Required *

    string

    The ID of the activity or job, for which you want to retrieve details. To find the job ID, use the `GET /v1/workspaces/{id}/actions` API.

    Query Parameters

    log_tf_cmd

    boolean

    Enter false to replace the first line in each Terraform command section, such as Terraform INIT or Terraform PLAN, with Schematics INIT (Schematics PLAN) in your log output. In addition, the log lines Starting command: terraform init -input=false -no-color and Starting command: terraform apply -state=terraform.tfstate -var-file=schematics.tfvars -auto-approve -no-color are suppressed. All subsequent command lines still use the Terraform command prefix. To remove this prefix, use the log_tf_prefix option.

    log_tf_prefix

    boolean

    `false` will hide all the terraform command prefix in the log statements

    log_tf_null_resource

    boolean

    `false` will hide all the null resource prefix in the log statements

    log_tf_ansible

    boolean

    `true` will format all logs to withhold the original format of ansible output in the log statements

    Response

    200 - Successfully retrieved the template activity logs as text (string).

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified workspace, action, or template could not be found. Verify that you entered the correct workspace, action ID, and template ID. To find the ID of your workspace or template, use the `GET /v1/workspaces` API. To find the ID of the action, use the `GET /v1/workspaces/{id}/actions` API.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Delete one or more workspace

    POST /v1/workspace_jobs

    Delete one or multiple Schematics workspace. Deleting a workspace does not destroy the resources from the Schematics workspace.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Request Body

    WorkspaceBulkDeleteRequest

    Create a workspace deletion job

    job

    string

    Job type such as delete of a batch operation.

    version

    string

    A version of the terraform template.

    workspaces

    array

    The List of workspaces to be deleted.

    Path Parameters

    Query Parameters

    Response

    200 - Successfully initiated the workspace deletion.

    job

    string

    The workspace deletion job name.

    job_id

    string

    The workspace deletion job id.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - Deletion failed. The workspace is marked as frozen. Unfreeze the workspace before you retry the request.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    429 - Too many requests have been made within a time window. "IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The host can be `us-east`, `us-south`, `eu-gb`, or `eu-de` region". Wait before calling the API again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions. ">

    Get the workspace deletion job status

    GET /v1/workspace_jobs/{wj_id}/status

    Retrieve detailed information for a workspace deletion job status.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Path Parameters

    wj_id

    Required *

    string

    The workspace job ID.

    Query Parameters

    Response

    200 - Successfully retrieved details about your workspace deletion job.

    job_status

    WorkspaceJobStatusType

    Status of the workspace bulk job

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The specified workspace could not be found. Verify that the workspace ID is correct. To list workspaces in your IBM Cloud account, use the `GET /v1/workspaces API`.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    429 - Too many requests have been made within a time window. "IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The host can be `us-east`, `us-south`, `eu-gb`, or `eu-de` region". Wait before calling the API again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    API endpoints.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.">

    List actions

    GET /v2/actions

    Retrieve a list of all Schematics actions that depends on the API endpoint that you have access. For example, if you use an API endpoint for a geography, such as North America, only actions that are created in `us-south` or `us-east` are retrieved.

    For more information, about supported API endpoints, see API endpoints.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.action.list

    Request

    Path Parameters

    Query Parameters

    offset

    integer

    The starting position of the item in the list of items. For example, if you have three workspaces in your account, the first workspace is assigned position number 0, the second workspace is assigned position number 1, and so forth. If you have 6 workspaces and you want to list the details for workspaces `2-6`, enter 1. To limit the number of workspaces that is returned, use the `limit` option in addition to the `offset` option. Negative numbers are not supported and are ignored.

    limit

    integer

    The maximum number of items that you want to list. The number must be a positive integer between 1 and 2000. If no value is provided, 100 is used by default.

    sort

    string

    Name of the field to sort-by; Use the '.' character to delineate sub-resources and sub-fields (eg. owner.last_name). Prepend the field with '+' or '-', indicating 'ascending' or 'descending' (default is ascending) Ignore unrecognized or unsupported sort field

    profile

    string

    Level of details returned by the get method

    Response

    200 - Successfully retrieved all actions.

    total_count

    integer

    Total number of records

    limit

    integer

    Number of records returned

    offset

    integer

    Skipped number of records

    actions

    array

    List of action records

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Windows Remote Management(`winrm`).

    For more information, about the Schematics create action, see ibmcloud schematics action create.

    Note you cannot update the location and region once an action is created.

    Also, make sure your IP addresses are in the allowlist.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions. ">

    Create an action

    POST /v2/actions

    Create an IBM Cloud Schematics action to run on a single target or groups of target hosts, roles, policies, or steps to deploy your resources in the target hosts. You can run the IBM Cloud resources the order in which you want to execute them. Note If your Git repository already contains a host file. Schematics does not overwrite the host file already present in your Git repository. For sample templates, see IBM Cloud Automation templates.

    The Schematics action API now supports bastion host connection with `non-root` user, and bastion connection type is marked as optional, when inventory connection type is set as Windows Remote Management(`winrm`).

    For more information, about the Schematics create action, see ibmcloud schematics action create.

    Note you cannot update the location and region once an action is created.

    Also, make sure your IP addresses are in the allowlist.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.action.create

    Request

    Request Body

    Action

    Create Action request

    name

    string

    The unique name of your action. The name can be up to 128 characters long and can include alphanumeric characters, spaces, dashes, and underscores. Example you can use the name to stop action.

    description

    string

    Action description

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    resource_group

    string

    Resource-group name for an action. By default, an action is created in `Default` resource group.

    bastion_connection_type

    string

    Type of connection to be used when connecting to bastion host. If the `inventory_connection_type=winrm`, then `bastion_connection_type` is not supported.

    inventory_connection_type

    string

    Type of connection to be used when connecting to remote host. Note Currently, WinRM supports only Windows system with the public IPs and do not support Bastion host.

    tags

    array

    Action tags

    user_state

    UserState

    User defined status of the Schematics object

    state

    string

    User-defined states * `draft` Object can be modified; can be used by Jobs run by the author, during execution * `live` Object can be modified; can be used by Jobs during execution * `locked` Object cannot be modified; can be used by Jobs during execution * `disable` Object can be modified. cannot be used by Jobs during execution

    set_by

    string

    Name of the User who set the state of the Object

    set_at

    string

    When the User who set the state of the Object

    source_readme_url

    string

    URL of the `README` file, for the source URL.

    source

    ExternalSource

    Source of templates, playbooks, or controls

    source_type

    Required *

    string

    Type of source for the Template

    git

    object

    The connection details to the Git source repository.

    catalog

    object

    The connection details to the IBM Cloud Catalog source.

    source_type

    string

    Type of source for the Template

    command_parameter

    string

    Schematics job command parameter (playbook-name).

    inventory

    string

    Target inventory record ID, used by the action or ansible playbook

    credentials

    array

    credentials of the Action

    bastion

    BastionResourceDefinition

    Describes a bastion resource

    name

    string

    Bastion Name; the name must be unique

    host

    string

    Reference to the Inventory resource definition

    bastion_credential

    CredentialVariableData

    User editable credential variable data and system generated reference to the value.

    name

    string

    The name of the credential variable.

    value

    string

    The credential value for the variable or reference to the value. Note The SSH key should contain three `\n` in the SSH key value as shown in the example for CLI or API calls. When using Bastion from API you need to add SSH key in both `credentials` and `bastion_credentials`.

    redacted

    string

    This is used to check if the credentials are masked or not

    use_default

    boolean

    True, will ignore the data in the value attribute, instead the data in metadata.default_value will be used

    metadata

    object

    An user editable metadata for the credential variables.

    string

    The reference link to the variable value By default the expression points to `$self.value`.

    targets_ini

    string

    Inventory of host and host group for the playbook in `INI` file format. For example, `"targets_ini": "[webserverhost] 172.22.192.6 [dbhost] 172.22.192.5"`. For more information, about an inventory host group syntax, see Inventory host groups.

    inputs

    array

    Input variables for the Action

    outputs

    array

    Output variables for the Action

    settings

    array

    Environment variables for the Action

    id

    string

    Action ID

    crn

    string

    Action Cloud Resource Name.

    account

    string

    Action account ID.

    source_created_at

    string

    Action Playbook Source creation time.

    source_created_by

    string

    E-mail address of user who created the Action Playbook Source.

    source_updated_at

    string

    The action playbook updation time.

    source_updated_by

    string

    E-mail address of user who updated the action playbook source.

    created_at

    string

    Action creation time.

    created_by

    string

    E-mail address of the user who created an action.

    updated_at

    string

    Action updation time.

    updated_by

    string

    E-mail address of the user who updated an action.

    state

    ActionLite_state

    Computed state of the Action

    status_code

    string

    Status of automation (workspace or action)

    status_message

    string

    Automation status message - to be displayed along with the status_code

    playbook_names

    array

    Playbook names retrieved from the repository.

    sys_lock

    SystemLock

    System lock status

    sys_locked

    boolean

    Is the automation locked by a Schematic job ?

    sys_locked_by

    string

    Name of the User who performed the job, that lead to the locking of the automation

    sys_locked_at

    string

    When the User performed the job that lead to locking of the automation ?

    git_token_ref

    string

    secrets manager reference to git token

    encryption

    EncryptionInfo

    Encryption details about the workspace such as scheme (byok/kyok) and key CRN.

    crn

    string

    Key CRN

    scheme

    string

    Encryption scheme

    Path Parameters

    Query Parameters

    Response

    201 - Successfully created a new Action definition

    name

    string

    The unique name of your action. The name can be up to 128 characters long and can include alphanumeric characters, spaces, dashes, and underscores. Example you can use the name to stop action.

    description

    string

    Action description

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    resource_group

    string

    Resource-group name for an action. By default, an action is created in `Default` resource group.

    bastion_connection_type

    string

    Type of connection to be used when connecting to bastion host. If the `inventory_connection_type=winrm`, then `bastion_connection_type` is not supported.

    inventory_connection_type

    string

    Type of connection to be used when connecting to remote host. Note Currently, WinRM supports only Windows system with the public IPs and do not support Bastion host.

    tags

    array

    Action tags

    user_state

    UserState

    User defined status of the Schematics object

    source_readme_url

    string

    URL of the `README` file, for the source URL.

    source

    ExternalSource

    Source of templates, playbooks, or controls

    source_type

    string

    Type of source for the Template

    command_parameter

    string

    Schematics job command parameter (playbook-name).

    inventory

    string

    Target inventory record ID, used by the action or ansible playbook

    credentials

    array

    credentials of the Action

    bastion

    BastionResourceDefinition

    Describes a bastion resource

    bastion_credential

    CredentialVariableData

    User editable credential variable data and system generated reference to the value.

    targets_ini

    string

    Inventory of host and host group for the playbook in `INI` file format. For example, `"targets_ini": "[webserverhost] 172.22.192.6 [dbhost] 172.22.192.5"`. For more information, about an inventory host group syntax, see Inventory host groups.

    inputs

    array

    Input variables for the Action

    outputs

    array

    Output variables for the Action

    settings

    array

    Environment variables for the Action

    id

    string

    Action ID

    crn

    string

    Action Cloud Resource Name.

    account

    string

    Action account ID.

    source_created_at

    string

    Action Playbook Source creation time.

    source_created_by

    string

    E-mail address of user who created the Action Playbook Source.

    source_updated_at

    string

    The action playbook updation time.

    source_updated_by

    string

    E-mail address of user who updated the action playbook source.

    created_at

    string

    Action creation time.

    created_by

    string

    E-mail address of the user who created an action.

    updated_at

    string

    Action updation time.

    updated_by

    string

    E-mail address of the user who updated an action.

    state

    ActionLite_state

    Computed state of the Action

    playbook_names

    array

    Playbook names retrieved from the repository.

    sys_lock

    SystemLock

    System lock status

    git_token_ref

    string

    secrets manager reference to git token

    encryption

    EncryptionInfo

    Encryption details about the workspace such as scheme (byok/kyok) and key CRN.

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The specified resource already exists

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    429 - Too many requests have been made within a time window. "IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The host can be `us-east`, `us-south`, `eu-gb`, or `eu-de` region". Wait before calling the API again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Delete an action

    DELETE /v2/actions/{action_id}

    Delete a Schematics action and specify the Ansible playbook that you want to run against your IBM Cloud resources. Note you cannot delete or stop the job activity from an ongoing execution of an action defined in the playbook. You can repeat the execution of same job, whenever you patch the actions. For more information, about the Schematics action state, see Schematics action state diagram.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.action.delete

    Request

    Path Parameters

    action_id

    Required *

    string

    Action Id. Use GET /actions API to look up the Action Ids in your IBM Cloud account.

    Query Parameters

    Response

    204 - Successfully initiated stopping of the job, and deleted the job record

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The specified action could not be found. Verify that the action ID is correct. To list actions in your IBM Cloud account, use the `GET /v2/actions API`.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - Failed to delete the specific resoure. If the resource is locked, try again after unlocking.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    429 - Too many requests have been made within a time window. "IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The host can be `us-east`, `us-south`, `eu-gb`, or `eu-de` region". Wait before calling the API again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    503 - IBM Cloud Schematics could not process the request, due to a temporary overloading or maintenance. Try to reduce your request rate, or retry after a few minutes. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions. ">

    Get action details

    GET /v2/actions/{action_id}

    Retrieve the detailed information of an actions from your IBM Cloud account. This API returns a URL to the log file that you can retrieve by using the `GET /v2/actions/{action_id}/logs` API.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.action.read

    Request

    Path Parameters

    action_id

    Required *

    string

    Action Id. Use GET /actions API to look up the Action Ids in your IBM Cloud account.

    Query Parameters

    profile

    string

    Level of details returned by the get method

    Response

    200 - Successfully got the Action definition

    name

    string

    The unique name of your action. The name can be up to 128 characters long and can include alphanumeric characters, spaces, dashes, and underscores. Example you can use the name to stop action.

    description

    string

    Action description

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    resource_group

    string

    Resource-group name for an action. By default, an action is created in `Default` resource group.

    bastion_connection_type

    string

    Type of connection to be used when connecting to bastion host. If the `inventory_connection_type=winrm`, then `bastion_connection_type` is not supported.

    inventory_connection_type

    string

    Type of connection to be used when connecting to remote host. Note Currently, WinRM supports only Windows system with the public IPs and do not support Bastion host.

    tags

    array

    Action tags

    user_state

    UserState

    User defined status of the Schematics object

    source_readme_url

    string

    URL of the `README` file, for the source URL.

    source

    ExternalSource

    Source of templates, playbooks, or controls

    source_type

    string

    Type of source for the Template

    command_parameter

    string

    Schematics job command parameter (playbook-name).

    inventory

    string

    Target inventory record ID, used by the action or ansible playbook

    credentials

    array

    credentials of the Action

    bastion

    BastionResourceDefinition

    Describes a bastion resource

    bastion_credential

    CredentialVariableData

    User editable credential variable data and system generated reference to the value.

    targets_ini

    string

    Inventory of host and host group for the playbook in `INI` file format. For example, `"targets_ini": "[webserverhost] 172.22.192.6 [dbhost] 172.22.192.5"`. For more information, about an inventory host group syntax, see Inventory host groups.

    inputs

    array

    Input variables for the Action

    outputs

    array

    Output variables for the Action

    settings

    array

    Environment variables for the Action

    id

    string

    Action ID

    crn

    string

    Action Cloud Resource Name.

    account

    string

    Action account ID.

    source_created_at

    string

    Action Playbook Source creation time.

    source_created_by

    string

    E-mail address of user who created the Action Playbook Source.

    source_updated_at

    string

    The action playbook updation time.

    source_updated_by

    string

    E-mail address of user who updated the action playbook source.

    created_at

    string

    Action creation time.

    created_by

    string

    E-mail address of the user who created an action.

    updated_at

    string

    Action updation time.

    updated_by

    string

    E-mail address of the user who updated an action.

    state

    ActionLite_state

    Computed state of the Action

    playbook_names

    array

    Playbook names retrieved from the repository.

    sys_lock

    SystemLock

    System lock status

    git_token_ref

    string

    secrets manager reference to git token

    encryption

    EncryptionInfo

    Encryption details about the workspace such as scheme (byok/kyok) and key CRN.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The specified action could not be found. Verify that the action ID is correct. To list actions in your IBM Cloud account, use the `GET /v2/actions API`.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Windows Remote Management(`winrm`).

    Note you cannot update the location and region once an action is created. Also, make sure your IP addresses are in the [allowlist](https://cloud.ibm.com/docs/schematics?topic=schematics-allowed-ipaddresses].

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.">

    Update an action

    PATCH /v2/actions/{action_id}

    Update or replace an action to change the action state from the critical state to normal state, or pending state to the normal state for a successful execution. For more information, about the Schematics action state, see Schematics action state diagram.

    The Schematics action API now supports bastion host connection with `non-root` user, and bastion connection type is marked as optional, when inventory connection type is set as Windows Remote Management(`winrm`).

    Note you cannot update the location and region once an action is created. Also, make sure your IP addresses are in the [allowlist](https://cloud.ibm.com/docs/schematics?topic=schematics-allowed-ipaddresses].

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.action.update

    Request

    Request Body

    Action

    Action

    name

    string

    The unique name of your action. The name can be up to 128 characters long and can include alphanumeric characters, spaces, dashes, and underscores. Example you can use the name to stop action.

    description

    string

    Action description

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    resource_group

    string

    Resource-group name for an action. By default, an action is created in `Default` resource group.

    bastion_connection_type

    string

    Type of connection to be used when connecting to bastion host. If the `inventory_connection_type=winrm`, then `bastion_connection_type` is not supported.

    inventory_connection_type

    string

    Type of connection to be used when connecting to remote host. Note Currently, WinRM supports only Windows system with the public IPs and do not support Bastion host.

    tags

    array

    Action tags

    user_state

    UserState

    User defined status of the Schematics object

    state

    string

    User-defined states * `draft` Object can be modified; can be used by Jobs run by the author, during execution * `live` Object can be modified; can be used by Jobs during execution * `locked` Object cannot be modified; can be used by Jobs during execution * `disable` Object can be modified. cannot be used by Jobs during execution

    set_by

    string

    Name of the User who set the state of the Object

    set_at

    string

    When the User who set the state of the Object

    source_readme_url

    string

    URL of the `README` file, for the source URL.

    source

    ExternalSource

    Source of templates, playbooks, or controls

    source_type

    Required *

    string

    Type of source for the Template

    git

    object

    The connection details to the Git source repository.

    catalog

    object

    The connection details to the IBM Cloud Catalog source.

    source_type

    string

    Type of source for the Template

    command_parameter

    string

    Schematics job command parameter (playbook-name).

    inventory

    string

    Target inventory record ID, used by the action or ansible playbook

    credentials

    array

    credentials of the Action

    bastion

    BastionResourceDefinition

    Describes a bastion resource

    name

    string

    Bastion Name; the name must be unique

    host

    string

    Reference to the Inventory resource definition

    bastion_credential

    CredentialVariableData

    User editable credential variable data and system generated reference to the value.

    name

    string

    The name of the credential variable.

    value

    string

    The credential value for the variable or reference to the value. Note The SSH key should contain three `\n` in the SSH key value as shown in the example for CLI or API calls. When using Bastion from API you need to add SSH key in both `credentials` and `bastion_credentials`.

    redacted

    string

    This is used to check if the credentials are masked or not

    use_default

    boolean

    True, will ignore the data in the value attribute, instead the data in metadata.default_value will be used

    metadata

    object

    An user editable metadata for the credential variables.

    string

    The reference link to the variable value By default the expression points to `$self.value`.

    targets_ini

    string

    Inventory of host and host group for the playbook in `INI` file format. For example, `"targets_ini": "[webserverhost] 172.22.192.6 [dbhost] 172.22.192.5"`. For more information, about an inventory host group syntax, see Inventory host groups.

    inputs

    array

    Input variables for the Action

    outputs

    array

    Output variables for the Action

    settings

    array

    Environment variables for the Action

    id

    string

    Action ID

    crn

    string

    Action Cloud Resource Name.

    account

    string

    Action account ID.

    source_created_at

    string

    Action Playbook Source creation time.

    source_created_by

    string

    E-mail address of user who created the Action Playbook Source.

    source_updated_at

    string

    The action playbook updation time.

    source_updated_by

    string

    E-mail address of user who updated the action playbook source.

    created_at

    string

    Action creation time.

    created_by

    string

    E-mail address of the user who created an action.

    updated_at

    string

    Action updation time.

    updated_by

    string

    E-mail address of the user who updated an action.

    state

    ActionLite_state

    Computed state of the Action

    status_code

    string

    Status of automation (workspace or action)

    status_message

    string

    Automation status message - to be displayed along with the status_code

    playbook_names

    array

    Playbook names retrieved from the repository.

    sys_lock

    SystemLock

    System lock status

    sys_locked

    boolean

    Is the automation locked by a Schematic job ?

    sys_locked_by

    string

    Name of the User who performed the job, that lead to the locking of the automation

    sys_locked_at

    string

    When the User performed the job that lead to locking of the automation ?

    git_token_ref

    string

    secrets manager reference to git token

    encryption

    EncryptionInfo

    Encryption details about the workspace such as scheme (byok/kyok) and key CRN.

    crn

    string

    Key CRN

    scheme

    string

    Encryption scheme

    Path Parameters

    action_id

    Required *

    string

    Action Id. Use GET /actions API to look up the Action Ids in your IBM Cloud account.

    Query Parameters

    Response

    200 - Successfully updated an action.

    name

    string

    The unique name of your action. The name can be up to 128 characters long and can include alphanumeric characters, spaces, dashes, and underscores. Example you can use the name to stop action.

    description

    string

    Action description

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    resource_group

    string

    Resource-group name for an action. By default, an action is created in `Default` resource group.

    bastion_connection_type

    string

    Type of connection to be used when connecting to bastion host. If the `inventory_connection_type=winrm`, then `bastion_connection_type` is not supported.

    inventory_connection_type

    string

    Type of connection to be used when connecting to remote host. Note Currently, WinRM supports only Windows system with the public IPs and do not support Bastion host.

    tags

    array

    Action tags

    user_state

    UserState

    User defined status of the Schematics object

    source_readme_url

    string

    URL of the `README` file, for the source URL.

    source

    ExternalSource

    Source of templates, playbooks, or controls

    source_type

    string

    Type of source for the Template

    command_parameter

    string

    Schematics job command parameter (playbook-name).

    inventory

    string

    Target inventory record ID, used by the action or ansible playbook

    credentials

    array

    credentials of the Action

    bastion

    BastionResourceDefinition

    Describes a bastion resource

    bastion_credential

    CredentialVariableData

    User editable credential variable data and system generated reference to the value.

    targets_ini

    string

    Inventory of host and host group for the playbook in `INI` file format. For example, `"targets_ini": "[webserverhost] 172.22.192.6 [dbhost] 172.22.192.5"`. For more information, about an inventory host group syntax, see Inventory host groups.

    inputs

    array

    Input variables for the Action

    outputs

    array

    Output variables for the Action

    settings

    array

    Environment variables for the Action

    id

    string

    Action ID

    crn

    string

    Action Cloud Resource Name.

    account

    string

    Action account ID.

    source_created_at

    string

    Action Playbook Source creation time.

    source_created_by

    string

    E-mail address of user who created the Action Playbook Source.

    source_updated_at

    string

    The action playbook updation time.

    source_updated_by

    string

    E-mail address of user who updated the action playbook source.

    created_at

    string

    Action creation time.

    created_by

    string

    E-mail address of the user who created an action.

    updated_at

    string

    Action updation time.

    updated_by

    string

    E-mail address of the user who updated an action.

    state

    ActionLite_state

    Computed state of the Action

    playbook_names

    array

    Playbook names retrieved from the repository.

    sys_lock

    SystemLock

    System lock status

    git_token_ref

    string

    secrets manager reference to git token

    encryption

    EncryptionInfo

    Encryption details about the workspace such as scheme (byok/kyok) and key CRN.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The specified action could not be found. Verify that the action ID is correct. To list actions in your IBM Cloud account, use the `GET /v2/actions API`.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    429 - Too many requests have been made within a time window. "IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The host can be `us-east`, `us-south`, `eu-gb`, or `eu-de` region". Wait before calling the API again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions. ">

    Upload a TAR file to an action

    PUT /v2/actions/{action_id}/template_repo_upload

    Update your template by uploading tape archive file (.tar) file from your local machine. Before you use this API, you must create an action without a link to a GitHub or GitLab repository with the `POST /v2/actions` API.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.action.update

    Request

    Request Body

    Upload template tar file

    Path Parameters

    action_id

    Required *

    string

    Action Id. Use GET /actions API to look up the Action Ids in your IBM Cloud account.

    Query Parameters

    Response

    200 - Successfully received the Git repository as input TAR file for the template.

    file_value

    string

    Tar file value.

    has_received_file

    boolean

    Has received tar file?

    id

    string

    Template ID

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - Not found. The specified action could not be found. Verify that the action ID is correct. To list actions in your IBM Cloud account, use the `GET /v2/actions API`.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    List jobs

    GET /v2/jobs

    Retrieve a list of all Schematics jobs. The job displays a list of jobs with the status as `pending`, `in_progess`, `success`, or `failed`. Jobs are generated when you use the `POST /v2/jobs`, `PUT /v2/jobs/{job_id}`, or `DELETE /v2/jobs/{job_id}`.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.job.list

    Request

    Path Parameters

    Query Parameters

    offset

    integer

    The starting position of the item in the list of items. For example, if you have three workspaces in your account, the first workspace is assigned position number 0, the second workspace is assigned position number 1, and so forth. If you have 6 workspaces and you want to list the details for workspaces `2-6`, enter 1. To limit the number of workspaces that is returned, use the `limit` option in addition to the `offset` option. Negative numbers are not supported and are ignored.

    limit

    integer

    The maximum number of items that you want to list. The number must be a positive integer between 1 and 2000. If no value is provided, 100 is used by default.

    sort

    string

    Name of the field to sort-by; Use the '.' character to delineate sub-resources and sub-fields (eg. owner.last_name). Prepend the field with '+' or '-', indicating 'ascending' or 'descending' (default is ascending) Ignore unrecognized or unsupported sort field

    profile

    string

    Level of details returned by the get method

    resource

    string

    Name of the resource (workspaces, actions, environment or controls)

    resource_id

    string

    The Resource Id. It could be an Action-id or Workspace-id.

    action_id

    string

    Action Id

    workspace_id

    string

    Workspace Id

    list

    string

    list jobs

    Response

    200 - Successfully listed the jobs that you have access to.

    total_count

    integer

    Total number of records

    limit

    integer

    Number of records returned

    offset

    integer

    Skipped number of records

    jobs

    array

    List of job records

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Create a job

    POST /v2/jobs

    Create & launch the Schematics job. It can be used to launch an Ansible playbook against a target hosts. The job displays a list of jobs with the status as `pending`, `in_progess`, `success`, or `failed`.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.job.create

    Request

    Request Body

    Job

    Create a Job Record and launch the Job

    command_object

    string

    Name of the Schematics automation resource

    command_object_id

    string

    Job command object id (workspace-id, action-id)

    command_name

    string

    Schematics job command name

    command_parameter

    string

    Schematics job command parameter (playbook-name)

    command_options

    array

    Command line options for the command

    inputs

    array

    Job inputs used by Action or Workspace

    settings

    array

    Environment variables used by the Job while performing Action or Workspace

    tags

    array

    User defined tags, while running the job

    id

    string

    Job ID

    name

    string

    Job name, uniquely derived from the related Workspace or Action

    description

    string

    The description of your job is derived from the related action or workspace. The description can be up to 2048 characters long in size.

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    resource_group

    string

    Resource-group name derived from the related Workspace or Action

    submitted_at

    string

    Job submission time

    submitted_by

    string

    Email address of user who submitted the job

    start_at

    string

    Job start time

    end_at

    string

    Job end time

    duration

    string

    Duration of job execution; example 40 sec

    status

    JobStatus

    Job Status

    position_in_queue

    number

    Position of job in pending queue

    total_in_queue

    number

    Total no. of jobs in pending queue

    workspace_job_status

    object

    Workspace Job Status

    action_job_status

    object

    Action Job Status

    system_job_status

    object

    System Job Status

    flow_job_status

    object

    Environment Flow JOB Status

    cart_order_data

    array

    Contains the cart order data which can be used for different purpose for eg. service tagging

    data

    JobData

    Job data

    job_type

    Required *

    string

    Type of Job

    workspace_job_data

    object

    Workspace Job data

    action_job_data

    object

    Action Job data

    system_job_data

    object

    Controls Job data

    flow_job_data

    object

    Flow Job data

    bastion

    BastionResourceDefinition

    Describes a bastion resource

    name

    string

    Bastion Name; the name must be unique

    host

    string

    Reference to the Inventory resource definition

    log_summary

    JobLogSummary

    Job log summary record

    job_id

    string

    Workspace Id

    job_type

    string

    Type of Job

    log_start_at

    string

    Job log start timestamp

    log_analyzed_till

    string

    Job log update timestamp

    elapsed_time

    number

    Job log elapsed time (log_analyzed_till - log_start_at)

    log_errors

    array

    Job log errors

    repo_download_job

    object

    Repo download Job log summary

    workspace_job

    object

    Workspace Job log summary

    flow_job

    object

    Flow Job log summary

    action_job

    object

    Flow Job log summary

    system_job

    object

    System Job log summary

    log_store_url

    string

    Job log store URL

    state_store_url

    string

    Job state store URL

    results_url

    string

    Job results store URL

    updated_at

    string

    Job status updation timestamp

    job_runner_id

    string

    ID of the Job Runner

    agent

    AgentInfo

    Agent name, Agent id and associated policy ID information

    id

    string

    ID of the Agent bound to the schematics object (workspace, action).

    name

    string

    Name of the Agent bound to the schematics object.

    assignment_policy_id

    string

    ID of the agent assignment policy, that is used to bind the Agent to schematics object

    Path Parameters

    Query Parameters

    Response

    201 - Successfully created the job in IBM Cloud Schematics.

    command_object

    string

    Name of the Schematics automation resource

    command_object_id

    string

    Job command object id (workspace-id, action-id)

    command_name

    string

    Schematics job command name

    command_parameter

    string

    Schematics job command parameter (playbook-name)

    command_options

    array

    Command line options for the command

    inputs

    array

    Job inputs used by Action or Workspace

    settings

    array

    Environment variables used by the Job while performing Action or Workspace

    tags

    array

    User defined tags, while running the job

    id

    string

    Job ID

    name

    string

    Job name, uniquely derived from the related Workspace or Action

    description

    string

    The description of your job is derived from the related action or workspace. The description can be up to 2048 characters long in size.

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    resource_group

    string

    Resource-group name derived from the related Workspace or Action

    submitted_at

    string

    Job submission time

    submitted_by

    string

    Email address of user who submitted the job

    start_at

    string

    Job start time

    end_at

    string

    Job end time

    duration

    string

    Duration of job execution; example 40 sec

    status

    JobStatus

    Job Status

    cart_order_data

    array

    Contains the cart order data which can be used for different purpose for eg. service tagging

    data

    JobData

    Job data

    bastion

    BastionResourceDefinition

    Describes a bastion resource

    log_summary

    JobLogSummary

    Job log summary record

    log_store_url

    string

    Job log store URL

    state_store_url

    string

    Job state store URL

    results_url

    string

    Job results store URL

    updated_at

    string

    Job status updation timestamp

    job_runner_id

    string

    ID of the Job Runner

    agent

    AgentInfo

    Agent name, Agent id and associated policy ID information

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The specified resource already exists

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    429 - Too many requests have been made within a time window. "IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The host can be `us-east`, `us-south`, `eu-gb`, or `eu-de` region". Wait before calling the API again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    503 - IBM Cloud Schematics could not process the request, due to a temporary overloading or maintenance. Try to reduce your request rate, or retry after a few minutes. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Stop the running Job, and delete the Job

    DELETE /v2/jobs/{job_id}

    Stop the running Job, and delete the Job. Note You cannot delete or stop the job activity from an ongoing execution of an action defined in the playbook. You can repeat the execution of same job, whenever you patch or update the action or workspace.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.job.delete

    Request

    Path Parameters

    job_id

    Required *

    string

    Job Id. Use `GET /v2/jobs` API to look up the Job Ids in your IBM Cloud account.

    Query Parameters

    Response

    204 - Successfully initiated stopping of the job, and deleted the job record.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - Failed to delete the specific resoure. If the resource is locked, try again after unlocking.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    429 - Too many requests have been made within a time window. "IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The host can be `us-east`, `us-south`, `eu-gb`, or `eu-de` region". Wait before calling the API again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    503 - IBM Cloud Schematics could not process the request, due to a temporary overloading or maintenance. Try to reduce your request rate, or retry after a few minutes. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Get a job

    GET /v2/jobs/{job_id}

    Retrieve the detailed information of Job

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.job.read

    Request

    Path Parameters

    job_id

    Required *

    string

    Job Id. Use `GET /v2/jobs` API to look up the Job Ids in your IBM Cloud account.

    Query Parameters

    profile

    string

    Level of details returned by the get method

    Response

    200 - Successfully retrieved details about your job record.

    command_object

    string

    Name of the Schematics automation resource

    command_object_id

    string

    Job command object id (workspace-id, action-id)

    command_name

    string

    Schematics job command name

    command_parameter

    string

    Schematics job command parameter (playbook-name)

    command_options

    array

    Command line options for the command

    inputs

    array

    Job inputs used by Action or Workspace

    settings

    array

    Environment variables used by the Job while performing Action or Workspace

    tags

    array

    User defined tags, while running the job

    id

    string

    Job ID

    name

    string

    Job name, uniquely derived from the related Workspace or Action

    description

    string

    The description of your job is derived from the related action or workspace. The description can be up to 2048 characters long in size.

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    resource_group

    string

    Resource-group name derived from the related Workspace or Action

    submitted_at

    string

    Job submission time

    submitted_by

    string

    Email address of user who submitted the job

    start_at

    string

    Job start time

    end_at

    string

    Job end time

    duration

    string

    Duration of job execution; example 40 sec

    status

    JobStatus

    Job Status

    cart_order_data

    array

    Contains the cart order data which can be used for different purpose for eg. service tagging

    data

    JobData

    Job data

    bastion

    BastionResourceDefinition

    Describes a bastion resource

    log_summary

    JobLogSummary

    Job log summary record

    log_store_url

    string

    Job log store URL

    state_store_url

    string

    Job state store URL

    results_url

    string

    Job results store URL

    updated_at

    string

    Job status updation timestamp

    job_runner_id

    string

    ID of the Job Runner

    agent

    AgentInfo

    Agent name, Agent id and associated policy ID information

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Update a job

    PUT /v2/jobs/{job_id}

    Creates a copy of the Schematics job and relaunches an existing job by updating the information of an existing Schematics job.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.job.update

    Request

    Request Body

    Job

    Clone the Job-record, and relaunch the Job

    command_object

    string

    Name of the Schematics automation resource

    command_object_id

    string

    Job command object id (workspace-id, action-id)

    command_name

    string

    Schematics job command name

    command_parameter

    string

    Schematics job command parameter (playbook-name)

    command_options

    array

    Command line options for the command

    inputs

    array

    Job inputs used by Action or Workspace

    settings

    array

    Environment variables used by the Job while performing Action or Workspace

    tags

    array

    User defined tags, while running the job

    id

    string

    Job ID

    name

    string

    Job name, uniquely derived from the related Workspace or Action

    description

    string

    The description of your job is derived from the related action or workspace. The description can be up to 2048 characters long in size.

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    resource_group

    string

    Resource-group name derived from the related Workspace or Action

    submitted_at

    string

    Job submission time

    submitted_by

    string

    Email address of user who submitted the job

    start_at

    string

    Job start time

    end_at

    string

    Job end time

    duration

    string

    Duration of job execution; example 40 sec

    status

    JobStatus

    Job Status

    position_in_queue

    number

    Position of job in pending queue

    total_in_queue

    number

    Total no. of jobs in pending queue

    workspace_job_status

    object

    Workspace Job Status

    action_job_status

    object

    Action Job Status

    system_job_status

    object

    System Job Status

    flow_job_status

    object

    Environment Flow JOB Status

    cart_order_data

    array

    Contains the cart order data which can be used for different purpose for eg. service tagging

    data

    JobData

    Job data

    job_type

    Required *

    string

    Type of Job

    workspace_job_data

    object

    Workspace Job data

    action_job_data

    object

    Action Job data

    system_job_data

    object

    Controls Job data

    flow_job_data

    object

    Flow Job data

    bastion

    BastionResourceDefinition

    Describes a bastion resource

    name

    string

    Bastion Name; the name must be unique

    host

    string

    Reference to the Inventory resource definition

    log_summary

    JobLogSummary

    Job log summary record

    job_id

    string

    Workspace Id

    job_type

    string

    Type of Job

    log_start_at

    string

    Job log start timestamp

    log_analyzed_till

    string

    Job log update timestamp

    elapsed_time

    number

    Job log elapsed time (log_analyzed_till - log_start_at)

    log_errors

    array

    Job log errors

    repo_download_job

    object

    Repo download Job log summary

    workspace_job

    object

    Workspace Job log summary

    flow_job

    object

    Flow Job log summary

    action_job

    object

    Flow Job log summary

    system_job

    object

    System Job log summary

    log_store_url

    string

    Job log store URL

    state_store_url

    string

    Job state store URL

    results_url

    string

    Job results store URL

    updated_at

    string

    Job status updation timestamp

    job_runner_id

    string

    ID of the Job Runner

    agent

    AgentInfo

    Agent name, Agent id and associated policy ID information

    id

    string

    ID of the Agent bound to the schematics object (workspace, action).

    name

    string

    Name of the Agent bound to the schematics object.

    assignment_policy_id

    string

    ID of the agent assignment policy, that is used to bind the Agent to schematics object

    Path Parameters

    job_id

    Required *

    string

    Job Id. Use `GET /v2/jobs` API to look up the Job Ids in your IBM Cloud account.

    Query Parameters

    Response

    200 - Successfully relaunched the Job, returns a new Job Record

    command_object

    string

    Name of the Schematics automation resource

    command_object_id

    string

    Job command object id (workspace-id, action-id)

    command_name

    string

    Schematics job command name

    command_parameter

    string

    Schematics job command parameter (playbook-name)

    command_options

    array

    Command line options for the command

    inputs

    array

    Job inputs used by Action or Workspace

    settings

    array

    Environment variables used by the Job while performing Action or Workspace

    tags

    array

    User defined tags, while running the job

    id

    string

    Job ID

    name

    string

    Job name, uniquely derived from the related Workspace or Action

    description

    string

    The description of your job is derived from the related action or workspace. The description can be up to 2048 characters long in size.

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    resource_group

    string

    Resource-group name derived from the related Workspace or Action

    submitted_at

    string

    Job submission time

    submitted_by

    string

    Email address of user who submitted the job

    start_at

    string

    Job start time

    end_at

    string

    Job end time

    duration

    string

    Duration of job execution; example 40 sec

    status

    JobStatus

    Job Status

    cart_order_data

    array

    Contains the cart order data which can be used for different purpose for eg. service tagging

    data

    JobData

    Job data

    bastion

    BastionResourceDefinition

    Describes a bastion resource

    log_summary

    JobLogSummary

    Job log summary record

    log_store_url

    string

    Job log store URL

    state_store_url

    string

    Job state store URL

    results_url

    string

    Job results store URL

    updated_at

    string

    Job status updation timestamp

    job_runner_id

    string

    ID of the Job Runner

    agent

    AgentInfo

    Agent name, Agent id and associated policy ID information

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The specified resource is locked, cannot be updated or deleted

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    429 - Too many requests have been made within a time window. "IBM Cloud Schematics supports 50 API requests per minute, per host, and per customer. The host can be `us-east`, `us-south`, `eu-gb`, or `eu-de` region". Wait before calling the API again.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    503 - IBM Cloud Schematics could not process the request, due to a temporary overloading or maintenance. Try to reduce your request rate, or retry after a few minutes. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Get job logs

    GET /v2/jobs/{job_id}/logs

    Retrieve the job logs <h3>Authorization</h3> Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.job.read

    Request

    Path Parameters

    job_id

    Required *

    string

    Job Id. Use `GET /v2/jobs` API to look up the Job Ids in your IBM Cloud account.

    Query Parameters

    Response

    200 - Successfully lists the jobs logs that you have access to.

    job_id

    string

    Job Id

    job_name

    string

    Job name, uniquely derived from the related Workspace, Action or Controls

    log_summary

    JobLogSummary

    Job log summary record

    format

    string

    Format of the Log text

    details

    string

    Log text, generated by the Job

    updated_at

    string

    Job status updation timestamp

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Get output files from the Job record

    GET /v2/jobs/{job_id}/files

    Get output files from the Job record. For more information, about the Schematics job status, download job logs, and download the output files, see Download Schematics Job.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.job.read

    Request

    Path Parameters

    job_id

    Required *

    string

    Job Id. Use `GET /v2/jobs` API to look up the Job Ids in your IBM Cloud account.

    Query Parameters

    file_type

    Required *

    string

    The type of file you want to download eg.state_file, plan_json.

    Response

    200 - Successfully got the Job output files.

    job_id

    string

    Job Id

    job_name

    string

    Job name, uniquely derived from the related Workspace and Action

    summary

    array

    Summary metadata in the output files

    file_type

    string

    The type of output file generated by the Job

    file_content

    string

    Content of the file, generated by the job

    additional_files

    array

    Content of the additional files, generated by the child job

    updated_at

    string

    Job file updation timestamp

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Get a KMS settings

    GET /v2/settings/kms

    Retrieve the kms instance that is integrated with Schematics for the byok and kyok. For each geographic location supported in Schematics we can have different kms settings. For example `US` and `EU` will have different kms settings. <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.kms_settings.read

    Request

    Path Parameters

    Query Parameters

    location

    Required *

    string

    The location of the Resource

    Response

    200 - Successfully retrieved the kms settings.

    location

    string

    The location to integrate kms instance. For example, location can be `US` and `EU`.

    encryption_scheme

    string

    The encryption scheme values. Allowable values [`byok`,`kyok`].

    resource_group

    string

    The kms instance resource group to integrate.

    primary_crk

    KMSSettings_primary_crk

    The primary kms instance details.

    secondary_crk

    KMSSettings_secondary_crk

    The secondary kms instance details.

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The kms settings not found.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Update a KMS settings

    PUT /v2/settings/kms

    Replace or Update kms settings for a given location can be updated. Note you can update the kms settings only once. For example, if you use an API endpoint for a geography, such as North America, only kms settings for that region can be retrieved. <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Request Body

    KMSSettings

    Options to be provided with updating kms settings.

    location

    string

    The location to integrate kms instance. For example, location can be `US` and `EU`.

    encryption_scheme

    string

    The encryption scheme values. Allowable values [`byok`,`kyok`].

    resource_group

    string

    The kms instance resource group to integrate.

    primary_crk

    KMSSettings_primary_crk

    The primary kms instance details.

    kms_name

    string

    The primary kms instance name.

    kms_private_endpoint

    string

    The primary kms instance private endpoint.

    key_crn

    string

    The CRN of the primary root key.

    secondary_crk

    KMSSettings_secondary_crk

    The secondary kms instance details.

    kms_name

    string

    The secondary kms instance name.

    kms_private_endpoint

    string

    The secondary kms instance private endpoint.

    key_crn

    string

    The CRN of the secondary key.

    Response

    200 - Successfully retrieved the kms settings.

    location

    string

    The location to integrate kms instance. For example, location can be `US` and `EU`.

    encryption_scheme

    string

    The encryption scheme values. Allowable values [`byok`,`kyok`].

    resource_group

    string

    The kms instance resource group to integrate.

    primary_crk

    KMSSettings_primary_crk

    The primary kms instance details.

    secondary_crk

    KMSSettings_secondary_crk

    The secondary kms instance details.

    400 - Bad request - Verify the location, payload, or query parameters in the request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    List KMS instances

    GET /v2/settings/kms_instances

    Lists the kms instances of your IBM Cloud account to find your Key Protect or Hyper Protect Crypto Services by using the location and encrypted scheme.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Auditing

    Calling this method generates the following auditing event.

    • schematics.kms_instances.read

    Request

    Path Parameters

    Query Parameters

    encryption_scheme

    Required *

    string

    The encryption scheme to be used

    location

    Required *

    string

    The location of the Resource

    resource_group

    string

    The resource group (by default, fetch from all resource groups) name or ID

    limit

    integer

    The maximum number of items that you want to list. The number must be a positive integer between 1 and 2000. If no value is provided, 100 is used by default.

    sort

    string

    Name of the field to sort-by; Use the '.' character to delineate sub-resources and sub-fields (eg. owner.last_name). Prepend the field with '+' or '-', indicating 'ascending' or 'descending' (default is ascending) Ignore unrecognized or unsupported sort field

    Response

    200 - Successfully discovered the KMS instance from the customer account.

    total_count

    integer

    The total number of records.

    limit

    integer

    The number of records returned.

    offset

    integer

    The skipped number of records.

    kms_instances

    array

    The list of kms instances.

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - kms instance not found in the account.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    List inventory definitions

    GET /v2/inventories

    Retrieve a list of all Schematics inventories that depends on the API endpoint that you have access. For example, if you use an API endpoint for a geography, such as North America, only inventories that are created in `us-south` or `us-east` are retrieved. For more information, about supported API endpoints, see APIendpoints.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Path Parameters

    Query Parameters

    offset

    integer

    The starting position of the item in the list of items. For example, if you have three workspaces in your account, the first workspace is assigned position number 0, the second workspace is assigned position number 1, and so forth. If you have 6 workspaces and you want to list the details for workspaces `2-6`, enter 1. To limit the number of workspaces that is returned, use the `limit` option in addition to the `offset` option. Negative numbers are not supported and are ignored.

    limit

    integer

    The maximum number of items that you want to list. The number must be a positive integer between 1 and 2000. If no value is provided, 100 is used by default.

    sort

    string

    Name of the field to sort-by; Use the '.' character to delineate sub-resources and sub-fields (eg. owner.last_name). Prepend the field with '+' or '-', indicating 'ascending' or 'descending' (default is ascending) Ignore unrecognized or unsupported sort field

    profile

    string

    Level of details returned by the get method

    Response

    200 - Successful listed all inventory definition resources

    total_count

    integer

    Total number of records

    limit

    integer

    Number of records returned

    offset

    integer

    Skipped number of records

    inventories

    array

    List of inventory definition records

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    allowlist.

    If your Git repository already contains a host file. Schematics does not overwrite the host file already present in your Git repository.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.">

    Create an inventory definition

    POST /v2/inventories

    Create an IBM Cloud Schematics inventory as a single IBM Cloud resource where you want to run Ansible playbook by using Schematics actions. For more information, about inventory host groups, refer to creating static and dynamic inventory for Schematics actions.

    Note you cannot update the location and region, resource group once an action is created. Also, make sure your IP addresses are in the allowlist.

    If your Git repository already contains a host file. Schematics does not overwrite the host file already present in your Git repository.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Request Body

    InventoryResourceDefinition

    Create a Inventory definition resource

    name

    string

    The unique name of your Inventory definition. The name can be up to 128 characters long and can include alphanumeric characters, spaces, dashes, and underscores.

    description

    string

    The description of your Inventory definition. The description can be up to 2048 characters long in size.

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    resource_group

    string

    Resource-group id for the shared dataset

    connection_type

    string

    connection type to be ssh or wirm

    credentials

    array

    common credentials for the inventory

    common_credentials

    CredentialVariableData

    User editable credential variable data and system generated reference to the value.

    name

    string

    The name of the credential variable.

    value

    string

    The credential value for the variable or reference to the value. Note The SSH key should contain three `\n` in the SSH key value as shown in the example for CLI or API calls. When using Bastion from API you need to add SSH key in both `credentials` and `bastion_credentials`.

    redacted

    string

    This is used to check if the credentials are masked or not

    use_default

    boolean

    True, will ignore the data in the value attribute, instead the data in metadata.default_value will be used

    metadata

    object

    An user editable metadata for the credential variables.

    string

    The reference link to the variable value By default the expression points to `$self.value`.

    inventories_ini

    string

    Input inventory of host and host group for the playbook, in the `.ini` file format.

    resource_queries

    array

    Input resource query definitions that is used to dynamically generate the inventory of host and host group for the playbook

    bastion

    BastionResourceDefinition

    Describes a bastion resource

    name

    string

    Bastion Name; the name must be unique

    host

    string

    Reference to the Inventory resource definition

    bastion_credential

    CredentialVariableData

    User editable credential variable data and system generated reference to the value.

    name

    string

    The name of the credential variable.

    value

    string

    The credential value for the variable or reference to the value. Note The SSH key should contain three `\n` in the SSH key value as shown in the example for CLI or API calls. When using Bastion from API you need to add SSH key in both `credentials` and `bastion_credentials`.

    redacted

    string

    This is used to check if the credentials are masked or not

    use_default

    boolean

    True, will ignore the data in the value attribute, instead the data in metadata.default_value will be used

    metadata

    object

    An user editable metadata for the credential variables.

    string

    The reference link to the variable value By default the expression points to `$self.value`.

    inventory_view

    InventoryView

    Inventories' structured view for the provided inventory

    groups

    array

    List of inventory groups

    Response

    201 - Successfully created Inventory definition resource

    name

    string

    The unique name of your Inventory. The name can be up to 128 characters long and can include alphanumeric characters, spaces, dashes, and underscores.

    id

    string

    Inventory id

    description

    string

    The description of your Inventory. The description can be up to 2048 characters long in size.

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    resource_group

    string

    Resource-group name for the Inventory definition. By default, Inventory will be created in Default Resource Group

    created_at

    string

    Inventory creation time

    created_by

    string

    Email address of user who created the Inventory

    updated_at

    string

    Inventory updation time

    updated_by

    string

    Email address of user who updated the Inventory

    inventories_ini

    string

    Input inventory of host and host group for the playbook, in the .ini file format.

    resource_queries

    array

    Input resource queries that is used to dynamically generate the inventory of host and host group for the playbook

    connection_type

    string

    connection type to be ssh or wirm

    credentials

    array

    common credentials for the inventory

    common_credentials

    CredentialVariableData

    User editable credential variable data and system generated reference to the value.

    bastion

    BastionResourceDefinition

    Describes a bastion resource

    bastion_credential

    CredentialVariableData

    User editable credential variable data and system generated reference to the value.

    inventory_view

    InventoryView

    Inventories' structured view for the provided inventory

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The specified resource already exists

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    allowlist.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.">

    Delete an inventory definition

    DELETE /v2/inventories/{inventory_id}

    Use this API to delete the resource inventory definition by using the inventory ID that you want to run against. For more information, about inventory delete, refer to ibmcloud schematics inventory delete.

    Note you cannot delete the location and region, resource group from where your inventory is created. Also, make sure your IP addresses are in the allowlist.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Path Parameters

    inventory_id

    Required *

    string

    Resource Inventory Id. Use `GET /v2/inventories` API to look up the Resource Inventory definition Ids in your IBM Cloud account.

    Query Parameters

    Response

    204 - Successfully deleted the resource inventory definition

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - Failed to delete the specific resoure. If the resource is locked, try again after unlocking.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    allowlist.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.">

    Get an inventory definition

    GET /v2/inventories/{inventory_id}

    Use this API to retrieve the detailed information for a resource inventory definition used to target an action in your IBM Cloud account. For more information, about inventory get, refer to ibmcloud schematics inventory get.

    Note you can fetch only the location and region, resource group from where your inventory is created.
    Also, make sure your IP addresses are in the allowlist.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Path Parameters

    inventory_id

    Required *

    string

    Resource Inventory Id. Use `GET /v2/inventories` API to look up the Resource Inventory definition Ids in your IBM Cloud account.

    Query Parameters

    profile

    string

    Level of details returned by the get method

    Response

    200 - Successfully retrieved the resource inventory definition

    name

    string

    The unique name of your Inventory. The name can be up to 128 characters long and can include alphanumeric characters, spaces, dashes, and underscores.

    id

    string

    Inventory id

    description

    string

    The description of your Inventory. The description can be up to 2048 characters long in size.

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    resource_group

    string

    Resource-group name for the Inventory definition. By default, Inventory will be created in Default Resource Group

    created_at

    string

    Inventory creation time

    created_by

    string

    Email address of user who created the Inventory

    updated_at

    string

    Inventory updation time

    updated_by

    string

    Email address of user who updated the Inventory

    inventories_ini

    string

    Input inventory of host and host group for the playbook, in the .ini file format.

    resource_queries

    array

    Input resource queries that is used to dynamically generate the inventory of host and host group for the playbook

    connection_type

    string

    connection type to be ssh or wirm

    credentials

    array

    common credentials for the inventory

    common_credentials

    CredentialVariableData

    User editable credential variable data and system generated reference to the value.

    bastion

    BastionResourceDefinition

    Describes a bastion resource

    bastion_credential

    CredentialVariableData

    User editable credential variable data and system generated reference to the value.

    inventory_view

    InventoryView

    Inventories' structured view for the provided inventory

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    allowlist.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.">

    Update an inventory definition

    PUT /v2/inventories/{inventory_id}

    Use this API to update the inventory definition resource used to target an action. For more information, about inventory update, refer to ibmcloud schematics inventory update.

    Note you cannot update the location and region, resource group once an action is created. Also, make sure your IP addresses are in the allowlist.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Request Body

    InventoryUpdateResourceDefinition

    Update the inventory definition resource

    name

    string

    The unique name of your Inventory definition. The name can be up to 128 characters long and can include alphanumeric characters, spaces, dashes, and underscores.

    description

    string

    The description of your Inventory definition. The description can be up to 2048 characters long in size.

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    resource_group

    string

    Resource-group id for the shared dataset

    connection_type

    string

    connection type to be ssh or wirm

    credentials

    array

    common credentials for the inventory

    common_credentials

    CredentialVariableData

    User editable credential variable data and system generated reference to the value.

    name

    string

    The name of the credential variable.

    value

    string

    The credential value for the variable or reference to the value. Note The SSH key should contain three `\n` in the SSH key value as shown in the example for CLI or API calls. When using Bastion from API you need to add SSH key in both `credentials` and `bastion_credentials`.

    redacted

    string

    This is used to check if the credentials are masked or not

    use_default

    boolean

    True, will ignore the data in the value attribute, instead the data in metadata.default_value will be used

    metadata

    object

    An user editable metadata for the credential variables.

    string

    The reference link to the variable value By default the expression points to `$self.value`.

    inventories_ini

    string

    Input inventory of host and host group for the playbook, in the `.ini` file format.

    resource_queries

    array

    Input resource query definitions that is used to dynamically generate the inventory of host and host group for the playbook

    bastion

    BastionResourceDefinition

    Describes a bastion resource

    name

    string

    Bastion Name; the name must be unique

    host

    string

    Reference to the Inventory resource definition

    bastion_credential

    CredentialVariableData

    User editable credential variable data and system generated reference to the value.

    name

    string

    The name of the credential variable.

    value

    string

    The credential value for the variable or reference to the value. Note The SSH key should contain three `\n` in the SSH key value as shown in the example for CLI or API calls. When using Bastion from API you need to add SSH key in both `credentials` and `bastion_credentials`.

    redacted

    string

    This is used to check if the credentials are masked or not

    use_default

    boolean

    True, will ignore the data in the value attribute, instead the data in metadata.default_value will be used

    metadata

    object

    An user editable metadata for the credential variables.

    string

    The reference link to the variable value By default the expression points to `$self.value`.

    inventory_view

    InventoryView

    Inventories' structured view for the provided inventory

    groups

    array

    List of inventory groups

    Path Parameters

    inventory_id

    Required *

    string

    Resource Inventory Id. Use `GET /v2/inventories` API to look up the Resource Inventory definition Ids in your IBM Cloud account.

    Query Parameters

    Response

    201 - Successfully updated the inventory definition resource

    name

    string

    The unique name of your Inventory. The name can be up to 128 characters long and can include alphanumeric characters, spaces, dashes, and underscores.

    id

    string

    Inventory id

    description

    string

    The description of your Inventory. The description can be up to 2048 characters long in size.

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    resource_group

    string

    Resource-group name for the Inventory definition. By default, Inventory will be created in Default Resource Group

    created_at

    string

    Inventory creation time

    created_by

    string

    Email address of user who created the Inventory

    updated_at

    string

    Inventory updation time

    updated_by

    string

    Email address of user who updated the Inventory

    inventories_ini

    string

    Input inventory of host and host group for the playbook, in the .ini file format.

    resource_queries

    array

    Input resource queries that is used to dynamically generate the inventory of host and host group for the playbook

    connection_type

    string

    connection type to be ssh or wirm

    credentials

    array

    common credentials for the inventory

    common_credentials

    CredentialVariableData

    User editable credential variable data and system generated reference to the value.

    bastion

    BastionResourceDefinition

    Describes a bastion resource

    bastion_credential

    CredentialVariableData

    User editable credential variable data and system generated reference to the value.

    inventory_view

    InventoryView

    Inventories' structured view for the provided inventory

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The specified resource is locked, cannot be updated or deleted

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    List resource queries

    GET /v2/resources_query

    Retrieve the list of resource query definitions that you have access to. The list of resource queries that is returned depends on the API endpoint that you use. For example, if you use an API endpoint for a geography, such as North America, only resource query definitions that are created in `us-south` or `us-east` are retrieved. For more information, about supported API endpoints, see API endpoints. <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Path Parameters

    Query Parameters

    offset

    integer

    The starting position of the item in the list of items. For example, if you have three workspaces in your account, the first workspace is assigned position number 0, the second workspace is assigned position number 1, and so forth. If you have 6 workspaces and you want to list the details for workspaces `2-6`, enter 1. To limit the number of workspaces that is returned, use the `limit` option in addition to the `offset` option. Negative numbers are not supported and are ignored.

    limit

    integer

    The maximum number of items that you want to list. The number must be a positive integer between 1 and 2000. If no value is provided, 100 is used by default.

    sort

    string

    Name of the field to sort-by; Use the '.' character to delineate sub-resources and sub-fields (eg. owner.last_name). Prepend the field with '+' or '-', indicating 'ascending' or 'descending' (default is ascending) Ignore unrecognized or unsupported sort field

    profile

    string

    Level of details returned by the get method

    Response

    200 - Successful listed all resource query definitions

    total_count

    integer

    Total number of records

    limit

    integer

    Number of records returned

    offset

    integer

    Skipped number of records

    resource_queries

    array

    List of resource query records. (Deprecated ResourceQueries. Instead, use resource_queries.)

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    allowlist.

    If your Git repository already contains a host file. Schematics does not overwrite the host file already present in your Git repository. <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.">

    Create resource query

    POST /v2/resources_query

    Use this API to create a resource query definition that will be used to select an IBM Cloud resource or a group of resources as the dynamic inventory for the Schematics Actions. For more information, about resource query commands, refer to ibmcloud schematics resource query create.

    Note you cannot update the location and region, resource group once an action is created. Also, make sure your IP addresses are in the allowlist.

    If your Git repository already contains a host file. Schematics does not overwrite the host file already present in your Git repository. <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Request Body

    ResourceQueryDefinition

    Create a resource query definition

    type

    string

    Resource type (cluster, vsi, icd, vpc)

    name

    string

    Resource query name

    queries

    array

    List of resource queries

    Response

    200 - Successfully created resource query definition

    type

    string

    Resource type (cluster, vsi, icd, vpc)

    name

    string

    Resource query name

    id

    string

    Resource Query id

    created_at

    string

    Resource query creation time

    created_by

    string

    Email address of user who created the Resource query

    updated_at

    string

    Resource query updation time

    updated_by

    string

    Email address of user who updated the Resource query

    queries

    array

    List of resource queries

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The specified resource already exists

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Delete resources query

    DELETE /v2/resources_query/{query_id}

    Use this API to delete the resource query definition by Id. For more information, about resource query commands, refer to ibmcloud schematics resource query delete.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Path Parameters

    query_id

    Required *

    string

    Resource query Id. Use `GET /v2/resource_query` API to look up the Resource query definition Ids in your IBM Cloud account.

    Query Parameters

    Response

    204 - Successfully deletes a resources query definition.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - Failed to delete the specific resoure. If the resource is locked, try again after unlocking.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Get resources query

    GET /v2/resources_query/{query_id}

    Use this API to retrieve the information resource query by Id. For more information, about resource query commands, refer to ibmcloud schematics resource query get.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Path Parameters

    query_id

    Required *

    string

    Resource query Id. Use `GET /v2/resource_query` API to look up the Resource query definition Ids in your IBM Cloud account.

    Query Parameters

    Response

    200 - Successfully fetches a resources query definition.

    type

    string

    Resource type (cluster, vsi, icd, vpc)

    name

    string

    Resource query name

    id

    string

    Resource Query id

    created_at

    string

    Resource query creation time

    created_by

    string

    Email address of user who created the Resource query

    updated_at

    string

    Resource query updation time

    updated_by

    string

    Email address of user who updated the Resource query

    queries

    array

    List of resource queries

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Run the resource query

    POST /v2/resources_query/{query_id}

    Run the resource query

    Request

    Path Parameters

    query_id

    Required *

    string

    Resource query Id. Use `GET /v2/resource_query` API to look up the Resource query definition Ids in your IBM Cloud account.

    Query Parameters

    Response

    200 - Successfully executed resource query

    response

    array

    List of resource query response records

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The specified resource already exists

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    allowlist.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.">

    Update resources query definition

    PUT /v2/resources_query/{query_id}

    Use this API to update the resource query definition used to build the dynamic inventory for the Schematics Action. For more information, about resource query commands, refer to ibmcloud schematics resource query update.

    Note you cannot update the location and region, resource group once a resource query is created. Also, make sure your IP addresses are in the allowlist.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Request Body

    ResourceQueryDefinition

    Replace the resources query definition

    type

    string

    Resource type (cluster, vsi, icd, vpc)

    name

    string

    Resource query name

    queries

    array

    List of resource queries

    Path Parameters

    query_id

    Required *

    string

    Resource query Id. Use `GET /v2/resource_query` API to look up the Resource query definition Ids in your IBM Cloud account.

    Query Parameters

    Response

    200 - Successfully updated the resources query definition

    type

    string

    Resource type (cluster, vsi, icd, vpc)

    name

    string

    Resource query name

    id

    string

    Resource Query id

    created_at

    string

    Resource query creation time

    created_by

    string

    Email address of user who created the Resource query

    updated_at

    string

    Resource query updation time

    updated_by

    string

    Email address of user who updated the Resource query

    queries

    array

    List of resource queries

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The specified resource is locked, cannot be updated or deleted

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Get variable metadata by parsing the template

    POST /v2/template_metadata_processor

    Get the variable metadata from the template. This metadata can be passed in the payload during Schematics workspace create or update API call.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Request Body

    TemplateMetaDataRequest

    Create template metadata request.

    region

    string

    Region on which request should process. Applicable only on global endpoint.

    template_type

    Required *

    string

    Template type such as terraform, ansible, helm, cloudpak, or bash script.

    source

    Required *

    ExternalSource

    Source of templates, playbooks, or controls

    source_type

    Required *

    string

    Type of source for the Template

    git

    object

    The connection details to the Git source repository.

    catalog

    object

    The connection details to the IBM Cloud Catalog source.

    source_type

    string

    Type of source for the Template

    Path Parameters

    Query Parameters

    Response

    200 - Successfully processed the template.

    type

    string

    The template type such as terraform, ansible, helm, cloudpak, or bash script.

    variables

    array

    List of variables and its metadata

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions. ">

    List agents

    GET /v2/agents

    Retrieve a list of Schematics agents from your IBM Cloud account that you have access to. The list of agents that is returned depends on the API endpoint that you use. For example, if you use an API endpoint for a geography, such as North America, only agents that are created in `us-south or `us-east` are returned. For more information about frequently asked questions, see FAQ and Troubleshooting guide. For more information about supported API endpoints, see API endpoint.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Path Parameters

    Query Parameters

    offset

    integer

    The starting position of the item in the list of items. For example, if you have three workspaces in your account, the first workspace is assigned position number 0, the second workspace is assigned position number 1, and so forth. If you have 6 workspaces and you want to list the details for workspaces `2-6`, enter 1. To limit the number of workspaces that is returned, use the `limit` option in addition to the `offset` option. Negative numbers are not supported and are ignored.

    limit

    integer

    The maximum number of items that you want to list. The number must be a positive integer between 1 and 2000. If no value is provided, 100 is used by default.

    profile

    string

    Level of details returned by the get method

    filter

    string

    Use `new` to get all unregistered agents; use `saved` to get all registered agents.

    Response

    200 - Successfully listed all agents in the account

    total_count

    integer

    The total number of records.

    limit

    integer

    The number of records returned.

    offset

    integer

    The skipped number of records.

    agents

    array

    The list of agents in the account.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions. ">

    Create an agent

    POST /v2/agents

    Subsequently, create an agent definition to manage the agent deployment with the agent configuration that will be used to deploy your agent to its target location. Getting API endpoint:-

    • The Schematics API endpoint that you use to create the agent determines where your Schematics agent run and your data is stored. For more information about supported API endpoints, see API endpoints. * If you use the API endpoint for a geography and not a specific location, such as North America, you can specify the location in your API request body. * If you do not specify the location in the request body, Schematics determines your agent location based on availability. * If you use an API endpoint for a specific location, such as Frankfurt, the location that you enter in your API request body must match your API endpoint. * You also have the option to not specify a location in your API request body if you use a location-specific API endpoint. * Follow the steps to retrieve your IAM access token and authenticate with IBM Cloud Schematics by using the API. * For more information about frequently asked questions, see FAQ and Troubleshooting guide.

      <h3>Authorization</h3>

      Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Request Body

    AgentData

    Create the agent using schematics.

    name

    Required *

    string

    The name of the agent (must be unique, for an account).

    description

    string

    Agent description.

    resource_group

    Required *

    string

    The resource-group name for the agent. By default, agent will be registered in Default Resource Group.

    tags

    array

    Tags for the agent.

    version

    Required *

    string

    Agent version

    schematics_location

    Required *

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    agent_location

    Required *

    string

    The location where agent is deployed in the user environment.

    agent_infrastructure

    Required *

    AgentInfrastructure

    The infrastructure parameters used by the agent.

    infra_type

    string

    Type of target agent infrastructure.

    cluster_id

    string

    The cluster ID where agent services will be running.

    cluster_resource_group

    string

    The resource group of the cluster (is it required?)

    cos_instance_name

    string

    The COS instance name to store the agent logs.

    cos_bucket_name

    string

    The COS bucket name used to store the logs.

    cos_bucket_region

    string

    The COS bucket region.

    agent_metadata

    array

    The metadata of an agent.

    agent_inputs

    array

    Additional input variables for the agent

    user_state

    AgentUserState

    User defined status of the agent

    state

    string

    User-defined states * `enable` Agent is enabled by the user. * `disable` Agent is disbaled by the user.

    set_by

    string

    Name of the User who set the state of the Object

    set_at

    string

    When the User who set the state of the Object

    agent_crn

    string

    The agent crn, obtained from the Schematics agent deployment configuration.

    id

    string

    The agent resource id.

    created_at

    string

    The agent creation date-time.

    creation_by

    string

    The email address of an user who created the agent.

    updated_at

    string

    The agent registration updation time.

    updated_by

    string

    Email address of user who updated the agent registration.

    system_state

    AgentSystemStatus

    Computed state of the agent

    status_code

    string

    Agent Status

    status_message

    string

    The agent status message.

    agent_kpi

    AgentKPIData

    Schematics Agent key performance indicators.

    availability_indicator

    string

    Overall availability indicator reported by the agent

    lifecycle_indicator

    string

    Overall lifecycle indicator reported by the agents

    percent_usage_indicator

    string

    Percentage usage of the agent resources.

    application_indicators

    array

    Agent application key performance indicators.

    infra_indicators

    array

    Agent infrastructure key performance indicators.

    recent_prs_job

    object

    Run a pre-requisite scanner for deploying agent.

    agent_id

    string

    Id of the agent.

    job_id

    string

    Job Id

    updated_at

    string

    The agent prs job updation time.

    updated_by

    string

    Email address of user who ran the agent prs job.

    agent_version

    string

    Agent version

    status_code

    string

    Status of Jobs

    status_message

    string

    The outcome of the pre-requisite scanner job, in a formatted log string.

    log_url

    string

    URL to the full pre-requisite scanner job logs.

    recent_deploy_job

    object

    Post-installations checks for Agent health.

    agent_id

    string

    Id of the agent.

    job_id

    string

    Job Id

    updated_at

    string

    The agent deploy job updation time.

    updated_by

    string

    Email address of user who ran the agent deploy job.

    is_redeployed

    boolean

    True, when the same version of the agent was redeployed.

    agent_version

    string

    Agent version.

    status_code

    string

    Status of Jobs

    status_message

    string

    The outcome of the agent deployment job, in a formatted log string.

    log_url

    string

    URL to the full agent deployment job logs.

    recent_health_job

    object

    Agent health check

    agent_id

    string

    Id of the agent

    job_id

    string

    Job Id

    updated_at

    string

    The agent health check job updation time.

    updated_by

    string

    Email address of user who ran the agent health check job.

    agent_version

    string

    Agent version

    status_code

    string

    Status of Jobs

    status_message

    string

    The outcome of the health-check job, in a formatted log string

    log_url

    string

    URL to the full health-check job logs

    recent_destroy_job

    object

    destroy resource provisoned by agent deploy method.

    agent_id

    string

    Id of the agent.

    job_id

    string

    Job Id

    updated_at

    string

    The agent resources destroy job updation time.

    updated_by

    string

    Email address of user who ran the agent resources destroy job.

    agent_version

    string

    Agent version.

    status_code

    string

    Status of Jobs

    status_message

    string

    The outcome of the agent resources destroy job, in a formatted log string.

    log_url

    string

    URL to the full agent resources destroy job logs.

    encryption

    EncryptionInfo

    Encryption details about the workspace such as scheme (byok/kyok) and key CRN.

    crn

    string

    Key CRN

    scheme

    string

    Encryption scheme

    Response

    201 - Successfully created the agent

    name

    string

    The name of the agent (must be unique, for an account).

    description

    string

    Agent description.

    resource_group

    string

    The resource-group name for the agent. By default, agent will be registered in Default Resource Group.

    tags

    array

    Tags for the agent.

    version

    string

    Agent version

    schematics_location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    agent_location

    string

    The location where agent is deployed in the user environment.

    agent_infrastructure

    AgentInfrastructure

    The infrastructure parameters used by the agent.

    agent_metadata

    array

    The metadata of an agent.

    agent_inputs

    array

    Additional input variables for the agent

    user_state

    AgentUserState

    User defined status of the agent

    agent_crn

    string

    The agent crn, obtained from the Schematics agent deployment configuration.

    id

    string

    The agent resource id.

    created_at

    string

    The agent creation date-time.

    creation_by

    string

    The email address of an user who created the agent.

    updated_at

    string

    The agent registration updation time.

    updated_by

    string

    Email address of user who updated the agent registration.

    system_state

    AgentSystemStatus

    Computed state of the agent

    agent_kpi

    AgentKPIData

    Schematics Agent key performance indicators.

    recent_prs_job

    object

    Run a pre-requisite scanner for deploying agent.

    recent_deploy_job

    object

    Post-installations checks for Agent health.

    recent_health_job

    object

    Agent health check

    recent_destroy_job

    object

    destroy resource provisoned by agent deploy method.

    encryption

    EncryptionInfo

    Encryption details about the workspace such as scheme (byok/kyok) and key CRN.

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The specified resource already exists

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions. ">

    Delete agent

    DELETE /v2/agents/{agent_id}

    Use this API to disable and delete the agent. Follow the steps to retrieve your IAM access token and authenticate with IBM Cloud Schematics by using the API. For more information about frequently asked questions, see FAQ and Troubleshooting guide.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Path Parameters

    agent_id

    Required *

    string

    Agent ID to get the details of agent

    Query Parameters

    force

    boolean

    Equivalent to -force options in the command line, default is false

    Response

    204 - Successfully deleted the agent

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions. ">

    Get agent details

    GET /v2/agents/{agent_id}

    Retrieve a detailed configuration of an agent with a specific agent ID. The agent that is returned depends on the API endpoint that you use. For example, if you use an API endpoint for a geography, such as North America, only agents that are created in `us-south or `us-east` are returned. For more information about frequently asked questions, see FAQ and Troubleshooting guide. For more information about supported API endpoints, see API endpoint.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Path Parameters

    agent_id

    Required *

    string

    Agent ID to get the details of agent

    Query Parameters

    profile

    string

    Level of details returned by the get method

    Response

    200 - Successfully got the agent details

    name

    string

    The name of the agent (must be unique, for an account).

    description

    string

    Agent description.

    resource_group

    string

    The resource-group name for the agent. By default, agent will be registered in Default Resource Group.

    tags

    array

    Tags for the agent.

    version

    string

    Agent version

    schematics_location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    agent_location

    string

    The location where agent is deployed in the user environment.

    agent_infrastructure

    AgentInfrastructure

    The infrastructure parameters used by the agent.

    agent_metadata

    array

    The metadata of an agent.

    agent_inputs

    array

    Additional input variables for the agent

    user_state

    AgentUserState

    User defined status of the agent

    agent_crn

    string

    The agent crn, obtained from the Schematics agent deployment configuration.

    id

    string

    The agent resource id.

    created_at

    string

    The agent creation date-time.

    creation_by

    string

    The email address of an user who created the agent.

    updated_at

    string

    The agent registration updation time.

    updated_by

    string

    Email address of user who updated the agent registration.

    system_state

    AgentSystemStatus

    Computed state of the agent

    agent_kpi

    AgentKPIData

    Schematics Agent key performance indicators.

    recent_prs_job

    object

    Run a pre-requisite scanner for deploying agent.

    recent_deploy_job

    object

    Post-installations checks for Agent health.

    recent_health_job

    object

    Agent health check

    recent_destroy_job

    object

    destroy resource provisoned by agent deploy method.

    encryption

    EncryptionInfo

    Encryption details about the workspace such as scheme (byok/kyok) and key CRN.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions. ">

    Update agent

    PUT /v2/agents/{agent_id}

    Use update agent API to update or replace the entire agent. For more information about steps to apply `UPDATE` and `PUT` command, see Deploying agent. For more information about supported API endpoints, see API endpoint.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Request Body

    AgentData

    Update the agent registration.

    name

    Required *

    string

    The name of the agent (must be unique, for an account).

    description

    string

    Agent description.

    resource_group

    Required *

    string

    The resource-group name for the agent. By default, agent will be registered in Default Resource Group.

    tags

    array

    Tags for the agent.

    version

    Required *

    string

    Agent version

    schematics_location

    Required *

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    agent_location

    Required *

    string

    The location where agent is deployed in the user environment.

    agent_infrastructure

    Required *

    AgentInfrastructure

    The infrastructure parameters used by the agent.

    infra_type

    string

    Type of target agent infrastructure.

    cluster_id

    string

    The cluster ID where agent services will be running.

    cluster_resource_group

    string

    The resource group of the cluster (is it required?)

    cos_instance_name

    string

    The COS instance name to store the agent logs.

    cos_bucket_name

    string

    The COS bucket name used to store the logs.

    cos_bucket_region

    string

    The COS bucket region.

    agent_metadata

    array

    The metadata of an agent.

    agent_inputs

    array

    Additional input variables for the agent

    user_state

    AgentUserState

    User defined status of the agent

    state

    string

    User-defined states * `enable` Agent is enabled by the user. * `disable` Agent is disbaled by the user.

    set_by

    string

    Name of the User who set the state of the Object

    set_at

    string

    When the User who set the state of the Object

    agent_crn

    string

    The agent crn, obtained from the Schematics agent deployment configuration.

    id

    string

    The agent resource id.

    created_at

    string

    The agent creation date-time.

    creation_by

    string

    The email address of an user who created the agent.

    updated_at

    string

    The agent registration updation time.

    updated_by

    string

    Email address of user who updated the agent registration.

    system_state

    AgentSystemStatus

    Computed state of the agent

    status_code

    string

    Agent Status

    status_message

    string

    The agent status message.

    agent_kpi

    AgentKPIData

    Schematics Agent key performance indicators.

    availability_indicator

    string

    Overall availability indicator reported by the agent

    lifecycle_indicator

    string

    Overall lifecycle indicator reported by the agents

    percent_usage_indicator

    string

    Percentage usage of the agent resources.

    application_indicators

    array

    Agent application key performance indicators.

    infra_indicators

    array

    Agent infrastructure key performance indicators.

    recent_prs_job

    object

    Run a pre-requisite scanner for deploying agent.

    agent_id

    string

    Id of the agent.

    job_id

    string

    Job Id

    updated_at

    string

    The agent prs job updation time.

    updated_by

    string

    Email address of user who ran the agent prs job.

    agent_version

    string

    Agent version

    status_code

    string

    Status of Jobs

    status_message

    string

    The outcome of the pre-requisite scanner job, in a formatted log string.

    log_url

    string

    URL to the full pre-requisite scanner job logs.

    recent_deploy_job

    object

    Post-installations checks for Agent health.

    agent_id

    string

    Id of the agent.

    job_id

    string

    Job Id

    updated_at

    string

    The agent deploy job updation time.

    updated_by

    string

    Email address of user who ran the agent deploy job.

    is_redeployed

    boolean

    True, when the same version of the agent was redeployed.

    agent_version

    string

    Agent version.

    status_code

    string

    Status of Jobs

    status_message

    string

    The outcome of the agent deployment job, in a formatted log string.

    log_url

    string

    URL to the full agent deployment job logs.

    recent_health_job

    object

    Agent health check

    agent_id

    string

    Id of the agent

    job_id

    string

    Job Id

    updated_at

    string

    The agent health check job updation time.

    updated_by

    string

    Email address of user who ran the agent health check job.

    agent_version

    string

    Agent version

    status_code

    string

    Status of Jobs

    status_message

    string

    The outcome of the health-check job, in a formatted log string

    log_url

    string

    URL to the full health-check job logs

    recent_destroy_job

    object

    destroy resource provisoned by agent deploy method.

    agent_id

    string

    Id of the agent.

    job_id

    string

    Job Id

    updated_at

    string

    The agent resources destroy job updation time.

    updated_by

    string

    Email address of user who ran the agent resources destroy job.

    agent_version

    string

    Agent version.

    status_code

    string

    Status of Jobs

    status_message

    string

    The outcome of the agent resources destroy job, in a formatted log string.

    log_url

    string

    URL to the full agent resources destroy job logs.

    encryption

    EncryptionInfo

    Encryption details about the workspace such as scheme (byok/kyok) and key CRN.

    crn

    string

    Key CRN

    scheme

    string

    Encryption scheme

    Path Parameters

    agent_id

    Required *

    string

    Agent ID to get the details of agent

    Query Parameters

    Response

    201 - Successfully Updated the agent

    name

    string

    The name of the agent (must be unique, for an account).

    description

    string

    Agent description.

    resource_group

    string

    The resource-group name for the agent. By default, agent will be registered in Default Resource Group.

    tags

    array

    Tags for the agent.

    version

    string

    Agent version

    schematics_location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    agent_location

    string

    The location where agent is deployed in the user environment.

    agent_infrastructure

    AgentInfrastructure

    The infrastructure parameters used by the agent.

    agent_metadata

    array

    The metadata of an agent.

    agent_inputs

    array

    Additional input variables for the agent

    user_state

    AgentUserState

    User defined status of the agent

    agent_crn

    string

    The agent crn, obtained from the Schematics agent deployment configuration.

    id

    string

    The agent resource id.

    created_at

    string

    The agent creation date-time.

    creation_by

    string

    The email address of an user who created the agent.

    updated_at

    string

    The agent registration updation time.

    updated_by

    string

    Email address of user who updated the agent registration.

    system_state

    AgentSystemStatus

    Computed state of the agent

    agent_kpi

    AgentKPIData

    Schematics Agent key performance indicators.

    recent_prs_job

    object

    Run a pre-requisite scanner for deploying agent.

    recent_deploy_job

    object

    Post-installations checks for Agent health.

    recent_health_job

    object

    Agent health check

    recent_destroy_job

    object

    destroy resource provisoned by agent deploy method.

    encryption

    EncryptionInfo

    Encryption details about the workspace such as scheme (byok/kyok) and key CRN.

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The specified resource already exists

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions.">

    Get agent versions

    GET /v2/agents/versions

    Retrieve the list of agent version's available to be deployed. For more information about supported API endpoints, see API endpoint.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Response

    200 - Successfully got the agent versions.

    supported_agent_versions

    array

    list of the versions supported

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Run pre-requisite scanner job

    PUT /v2/agents/{agent_id}/prs

    Use run pre-requisite scanner job API before deploying an agent. The API results the agent `prs` job updation time with the E-mail address and the status in a string format. For more information about supported API endpoints, see API endpoint. <h3>Authorization</h3> Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Path Parameters

    agent_id

    Required *

    string

    Agent ID to get the details of agent

    Query Parameters

    force

    boolean

    Equivalent to -force options in the command line, default is false

    Response

    202 - Successfully started pre-requisite scanner job.

    agent_id

    string

    Id of the agent.

    job_id

    string

    Job Id

    updated_at

    string

    The agent prs job updation time.

    updated_by

    string

    Email address of user who ran the agent prs job.

    agent_version

    string

    Agent version

    status_code

    string

    Status of Jobs

    status_message

    string

    The outcome of the pre-requisite scanner job, in a formatted log string.

    log_url

    string

    URL to the full pre-requisite scanner job logs.

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The specified resource already exists

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Run agent health check

    PUT /v2/agents/{agent_id}/health

    Use run agent health check job API to execute an agent health check job based on the agent ID. For more information about supported API endpoints, see API endpoint. <h3>Authorization</h3> Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Path Parameters

    agent_id

    Required *

    string

    Agent ID to get the details of agent

    Query Parameters

    force

    boolean

    Equivalent to -force options in the command line, default is false

    Response

    202 - Successfully started running the agent health check job

    agent_id

    string

    Id of the agent

    job_id

    string

    Job Id

    updated_at

    string

    The agent health check job updation time.

    updated_by

    string

    Email address of user who ran the agent health check job.

    agent_version

    string

    Agent version

    status_code

    string

    Status of Jobs

    status_message

    string

    The outcome of the health-check job, in a formatted log string

    log_url

    string

    URL to the full health-check job logs

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The specified resource already exists

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Run the agent deployment job

    PUT /v2/agents/{agent_id}/deploy

    Use run agent deployment job API to execute the agent deployment job based on the agent ID. For more information about supported API endpoints, see API endpoint. <h3>Authorization</h3> Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Path Parameters

    agent_id

    Required *

    string

    Agent ID to get the details of agent

    Query Parameters

    force

    boolean

    Equivalent to -force options in the command line, default is false

    Response

    202 - Successfully ran agent deployment job

    agent_id

    string

    Id of the agent.

    job_id

    string

    Job Id

    updated_at

    string

    The agent deploy job updation time.

    updated_by

    string

    Email address of user who ran the agent deploy job.

    is_redeployed

    boolean

    True, when the same version of the agent was redeployed.

    agent_version

    string

    Agent version.

    status_code

    string

    Status of Jobs

    status_message

    string

    The outcome of the agent deployment job, in a formatted log string.

    log_url

    string

    URL to the full agent deployment job logs.

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The specified resource already exists

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Delete resources provisioned by agent

    DELETE /v2/agents/{agent_id}/resources

    Use this API to destroy the resources provisioned for running an agent.

    Request

    Path Parameters

    agent_id

    Required *

    string

    Agent ID to get the details of agent

    Query Parameters

    Response

    202 - Successfully accepted the request to delete the resources

    message

    string

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions. ">

    List policies

    GET /v2/settings/policies

    Retrieve a list of all policies from the account that you have access. the list of policies that is returned depends on the API endpoint that you use. For example, if you use an API endpoint for a geography, such as North America, only policies that are created in `us-south` or `us-east` are returned. For more information about supported API endpoints, see API endpoint.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Path Parameters

    Query Parameters

    offset

    integer

    The starting position of the item in the list of items. For example, if you have three workspaces in your account, the first workspace is assigned position number 0, the second workspace is assigned position number 1, and so forth. If you have 6 workspaces and you want to list the details for workspaces `2-6`, enter 1. To limit the number of workspaces that is returned, use the `limit` option in addition to the `offset` option. Negative numbers are not supported and are ignored.

    limit

    integer

    The maximum number of items that you want to list. The number must be a positive integer between 1 and 2000. If no value is provided, 100 is used by default.

    profile

    string

    Level of details returned by the get method

    Response

    200 - Successfully listed all policies in the account

    total_count

    integer

    The total number of policy records.

    limit

    integer

    The number of policy records returned.

    offset

    integer

    The skipped number of policy records.

    policies

    array

    The list of Schematics policies.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions. ">

    Create a policy account

    POST /v2/settings/policies

    Use this API to create a policy using Schematics to select one or more Schematics objects (such as, Workspaces, Action) to deliver targeted Schematics feature. For more information about frequently asked questions, see FAQ and Troubleshooting guide.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Request Body

    Policy

    Create a new policy in account

    name

    string

    Name of Schematics customization policy

    description

    string

    The description of Schematics customization policy.

    resource_group

    string

    The resource group name for the policy. By default, Policy will be created in `default` Resource Group

    tags

    array

    Tags for the Schematics customization policy

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    state

    UserState

    User defined status of the Schematics object

    state

    string

    User-defined states * `draft` Object can be modified; can be used by Jobs run by the author, during execution * `live` Object can be modified; can be used by Jobs during execution * `locked` Object cannot be modified; can be used by Jobs during execution * `disable` Object can be modified. cannot be used by Jobs during execution

    set_by

    string

    Name of the User who set the state of the Object

    set_at

    string

    When the User who set the state of the Object

    kind

    Required *

    string

    Policy kind or categories for managing and deriving policy decision * `agent_assignment_policy` Agent assignment policy for job execution.

    target

    PolicyObjects

    The objects for the Schematics policy.

    selector_kind

    string

    Types of schematics object selector

    selector_ids

    array

    Static selectors of schematics object ids (agent, workspace or action) for the Schematics policy.

    selector_scope

    array

    Selectors to dynamically list of schematics object ids (agent, workspace or action) for the Schematics policy.

    parameter

    PolicyParameter

    The parameter to tune the Schematics policy.

    agent_assignment_policy_parameter

    object

    Parameters for the `agent_assignment_policy`

    id

    string

    The system generated policy Id.

    crn

    string

    The policy CRN.

    account

    string

    The Account id.

    scoped_resources

    array

    List of scoped Schematics resources targeted by the policy

    created_at

    string

    The policy creation time.

    created_by

    string

    The user who created the policy.

    updated_at

    string

    The policy updation time.

    Response

    201 - Successfully created the policy

    name

    string

    Name of Schematics customization policy

    description

    string

    The description of Schematics customization policy.

    resource_group

    string

    The resource group name for the policy. By default, Policy will be created in `default` Resource Group

    tags

    array

    Tags for the Schematics customization policy

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    state

    UserState

    User defined status of the Schematics object

    kind

    string

    Policy kind or categories for managing and deriving policy decision * `agent_assignment_policy` Agent assignment policy for job execution.

    target

    PolicyObjects

    The objects for the Schematics policy.

    parameter

    PolicyParameter

    The parameter to tune the Schematics policy.

    id

    string

    The system generated policy Id.

    crn

    string

    The policy CRN.

    account

    string

    The Account id.

    scoped_resources

    array

    List of scoped Schematics resources targeted by the policy

    created_at

    string

    The policy creation time.

    created_by

    string

    The user who created the policy.

    updated_at

    string

    The policy updation time.

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The specified resource already exists

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions. ">

    Delete policy

    DELETE /v2/settings/policies/{policy_id}

    Use this API to delete the policy. Follow the steps to retrieve your IAM access token and authenticate with IBM Cloud Schematics by using the API. For more information about frequently asked questions, see FAQ and Troubleshooting guide.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Path Parameters

    policy_id

    Required *

    string

    ID to get the details of policy

    Query Parameters

    Response

    204 - Successfully deleted the policy

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The specified resource is locked, cannot be updated or deleted

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions. ">

    Get policy

    GET /v2/settings/policies/{policy_id}

    Retrieve the detailed information of a policy details identified by `policy_id`. For more information about frequently asked questions, see FAQ and Troubleshooting guide. For more information about supported API endpoints, see API endpoint.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Path Parameters

    policy_id

    Required *

    string

    ID to get the details of policy

    Query Parameters

    profile

    string

    Level of details returned by the get method

    Response

    200 - Successfully got the policy details

    name

    string

    Name of Schematics customization policy

    description

    string

    The description of Schematics customization policy.

    resource_group

    string

    The resource group name for the policy. By default, Policy will be created in `default` Resource Group

    tags

    array

    Tags for the Schematics customization policy

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    state

    UserState

    User defined status of the Schematics object

    kind

    string

    Policy kind or categories for managing and deriving policy decision * `agent_assignment_policy` Agent assignment policy for job execution.

    target

    PolicyObjects

    The objects for the Schematics policy.

    parameter

    PolicyParameter

    The parameter to tune the Schematics policy.

    id

    string

    The system generated policy Id.

    crn

    string

    The policy CRN.

    account

    string

    The Account id.

    scoped_resources

    array

    List of scoped Schematics resources targeted by the policy

    created_at

    string

    The policy creation time.

    created_by

    string

    The user who created the policy.

    updated_at

    string

    The policy updation time.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    Schematics service access roles and required permissions. ">

    Update policy

    PATCH /v2/settings/policies/{policy_id}

    Use update policy API to update or replace the policy details by using policy ID. For more information about supported API endpoints, see API endpoint. Follow the steps to retrieve your IAM access token and authenticate with IBM Cloud Schematics by using the API. For more information about frequently asked questions, see FAQ and Troubleshooting guide.

    <h3>Authorization</h3>

    Schematics support generic authorization for its resources. For more information, about Schematics access and permissions, see Schematics service access roles and required permissions.

    Request

    Request Body

    Policy

    Update the policy details

    name

    string

    Name of Schematics customization policy

    description

    string

    The description of Schematics customization policy.

    resource_group

    string

    The resource group name for the policy. By default, Policy will be created in `default` Resource Group

    tags

    array

    Tags for the Schematics customization policy

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    state

    UserState

    User defined status of the Schematics object

    state

    string

    User-defined states * `draft` Object can be modified; can be used by Jobs run by the author, during execution * `live` Object can be modified; can be used by Jobs during execution * `locked` Object cannot be modified; can be used by Jobs during execution * `disable` Object can be modified. cannot be used by Jobs during execution

    set_by

    string

    Name of the User who set the state of the Object

    set_at

    string

    When the User who set the state of the Object

    kind

    Required *

    string

    Policy kind or categories for managing and deriving policy decision * `agent_assignment_policy` Agent assignment policy for job execution.

    target

    PolicyObjects

    The objects for the Schematics policy.

    selector_kind

    string

    Types of schematics object selector

    selector_ids

    array

    Static selectors of schematics object ids (agent, workspace or action) for the Schematics policy.

    selector_scope

    array

    Selectors to dynamically list of schematics object ids (agent, workspace or action) for the Schematics policy.

    parameter

    PolicyParameter

    The parameter to tune the Schematics policy.

    agent_assignment_policy_parameter

    object

    Parameters for the `agent_assignment_policy`

    id

    string

    The system generated policy Id.

    crn

    string

    The policy CRN.

    account

    string

    The Account id.

    scoped_resources

    array

    List of scoped Schematics resources targeted by the policy

    created_at

    string

    The policy creation time.

    created_by

    string

    The user who created the policy.

    updated_at

    string

    The policy updation time.

    Path Parameters

    policy_id

    Required *

    string

    ID to get the details of policy

    Query Parameters

    Response

    200 - Successfully updated the policy details

    name

    string

    Name of Schematics customization policy

    description

    string

    The description of Schematics customization policy.

    resource_group

    string

    The resource group name for the policy. By default, Policy will be created in `default` Resource Group

    tags

    array

    Tags for the Schematics customization policy

    location

    string

    List of locations supported by IBM Cloud Schematics service. While creating your workspace or action, choose the right region, since it cannot be changed. Note, this does not limit the location of the IBM Cloud resources, provisioned using Schematics.

    state

    UserState

    User defined status of the Schematics object

    kind

    string

    Policy kind or categories for managing and deriving policy decision * `agent_assignment_policy` Agent assignment policy for job execution.

    target

    PolicyObjects

    The objects for the Schematics policy.

    parameter

    PolicyParameter

    The parameter to tune the Schematics policy.

    id

    string

    The system generated policy Id.

    crn

    string

    The policy CRN.

    account

    string

    The Account id.

    scoped_resources

    array

    List of scoped Schematics resources targeted by the policy

    created_at

    string

    The policy creation time.

    created_by

    string

    The user who created the policy.

    updated_at

    string

    The policy updation time.

    400 - Bad request - Verify that the information in your request body is complete and correctly formatted in JSON.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    401 - The IAM authorization token for the request is missing, invalid, expired, or has no account. Check that the token value is correct or generate a new token with the `ibmcloud iam oauth-tokens` command.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    403 - Unauthorized access. Check that you have the correct access credentials and permissions.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    404 - The specified resource was not found

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    409 - The specified resource is locked, cannot be updated or deleted

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.

    500 - Internal server error. IBM Cloud Schematics is currently unavailable. Wait a few minutes, then try again. If the error persists, contact IBM Cloud support.

    message

    string

    Message text

    message_id

    string

    The message ID for translation.

    request_id

    string

    The request ID for request tracking.

    status_code

    integer

    The API response code.

    timestamp

    string

    The API response timestamp.