Update Action ID
  • 25 Sep 2024
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Update Action ID

  • Dark
    Light
  • PDF

Article summary

Patch
/api/1.0/asset-templates/{envId}/{assetTemplateId}/actions/{actionId}

This PATCH API is designed to perform an UPDATE operation on Action IDs in the indicated Environment. If you would like to update other fields, refer to the Import Asset Template.

Notice

Accessing the APIs is through a dedicated domain/URL, according to your PlainID Tenant Location
  • United States (US) - `https://api.us1.plainid.io`
  • Canada (CA) - `https://api.ca1.plainid.io`
  • Europe (EU) - `https://api.eu1.plainid.io`
  • Cloud PAA - `https://api.plainid.local`

  • Using HTML Encoded Special Characters

    Use HTML encoded patterns when working with values that contain special characters like spaces, dashes, etc. Refer to this HTML URL Encoding Reference for a full list.


    Important note about headers

    Refer to the headers below to modify your cURL sample. Check if the following headers are in the sample, if not, ensure you add it to your cURL sample before pasting into your API tool.

    Headers

    *Required
    HeaderValuecURL Line
    Accept`text/plain;language=rego``-H "Accept:application/json"`
    Content-Type`text/plain;language=rego``-H "Content-Type:application/json"`

    cURL Sample Guidelines

    In order for the relevant parameters to appear in the cURL sample, you can input the values in the interactive API console on the right. They will then appear in the cURL sample on the bottom of the page in the correct format.

    Security
    HTTP
    Type bearer

    For more details about Administration API Authentication, check out the Authentication APIs documentation. Provide your bearer token in the Authorization header when making requests to protected resources. Example: Authorization: Bearer 123

    Path parameters
    envId
    string (uuid) Required

    The Environment ID can be found under the Details Tab in the Environment Settings.

    assetTemplateId
    stringRequired

    The Asset Template ID

    actionId
    stringRequired

    The Action ID

    Body parameters

    Fields to patch in the Asset Template Action.

    example
    [
      {
        "op": "replace",
        "path": "/actionId",
        "value": "newID"
      }
    ]
    Array of object

    Asset Type Action patch

    object
    op
    string
    Valid values[ "\"replace\"" ]
    path
    string
    Pattern^(/[^/]+)+$
    value
    OneOf
    string
    string
    number
    number
    boolean
    boolean
    Responses
    204

    Successful operation

    Headers
    x-request-id
    string
    The ID of the request
    400

    Validation Error

    Headers
    x-request-id
    string
    The ID of the request
    401

    Unauthorized

    Headers
    x-request-id
    string
    The ID of the request
    403

    Forbidden

    Headers
    x-request-id
    string
    The ID of the request
    404

    Object not found

    Headers
    x-request-id
    string
    The ID of the request
    validationError
    {
      "errors": [
        {
          "code": "ATV-001",
          "id": "EQ7CMX",
          "message": "Asset Template: [non-existing-id] not found in Environment: [2d4a0591-dfe4-45fb-8a69-d183f5c75c0d]",
          "name": "AssetTemplateNotFoundError",
          "status": "404"
        }
      ]
    }
    Expand All
    object

    Response object

    errors
    Array of object (Error)
    object
    args
    object
    path
    string
    code
    string
    id
    string
    message
    string
    name
    string
    status
    integer
    422

    Payload Validation Error

    Headers
    x-request-id
    string
    The ID of the request
    validationError
    {
      "errors": [
        {
          "args": {
            "0": "path"
          },
          "code": "V-027",
          "id": "E9YIWG",
          "message": "$[0].path: is missing but it is required",
          "name": "UnprocessableEntityError",
          "status": "422"
        }
      ]
    }
    Expand All
    object

    Response object

    errors
    Array of object (Error)
    object
    args
    object
    path
    string
    code
    string
    id
    string
    message
    string
    name
    string
    status
    integer
    500

    Internal Server Error

    Headers
    x-request-id
    string
    The ID of the request

    Was this article helpful?