Skip to main content
PUT
/
api
/
assets
/
{assetID}
Update an asset by ID.
curl --request PUT \
  --url https://{tenant}/api/assets/{assetID} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "data": {
    "info": {
      "title": "Our Sample OAS",
      "version": "1.0.0"
    },
    "openapi": "3.0.3",
    "paths": {
      "/anything": {
        "post": {
          "operationId": "anythingpost",
          "responses": {
            "200": {
              "description": "post created"
            }
          }
        }
      }
    },
    "x-tyk-api-gateway": {
      "middleware": {
        "global": {
          "cache": {
            "cacheAllSafeRequests": true,
            "enabled": true,
            "timeout": 5
          }
        }
      }
    }
  },
  "description": "My first template",
  "id": "my-unique-template-id",
  "kind": "oas-template",
  "name": "Update asset name example."
}
'
{
  "ID": "my-unique-template-id",
  "Message": "asset updated",
  "Meta": "664d86e35715ec0d370bbe11",
  "Status": "success"
}

Documentation Index

Fetch the complete documentation index at: https://tyk.io/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

The Tyk Dashboard API Access Credentials

Path Parameters

assetID
string
required

ID of the asset to update - this value can be the database ID of the asset or the custom ID provided during creation/update.

Body

application/json

update name example.

data
object
Example:
{
"info": {
"title": "Our Sample OAS",
"version": "1.0.0"
},
"openapi": "3.0.3",
"paths": {
"/anything": {
"post": {
"operationId": "anythingpost",
"responses": { "200": { "description": "Post created" } }
}
}
},
"x-tyk-api-gateway": {
"middleware": {
"global": {
"cache": {
"cacheAllSafeRequests": true,
"enabled": true,
"timeout": 5
}
},
"operations": {
"anythingpost": {
"requestSizeLimit": { "enabled": true, "value": 100 }
}
}
}
}
}
description
string
id
string
kind
string
name
string

Response

asset updated

ID
string
Message
string
Meta
any
Status
string