GET
/
api
/
assets
/
{assetID}
Retrieve an asset.
curl --request GET \
  --url https://{tenant}/api/assets/{assetID} \
  --header 'Authorization: Bearer <token>'
{
  "_id": "363634636164353135373135656333663739386262636433",
  "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
          }
        },
        "operations": {
          "anythingpost": {
            "requestSizeLimit": {
              "enabled": true,
              "value": 100
            }
          }
        }
      }
    }
  },
  "description": "My first template",
  "id": "my-unique-template-id",
  "kind": "oas-template",
  "last_updated": "2024-05-21T17:18:57.294797+03:00",
  "name": "my-template",
  "org_id": "5e9d9544a1dcd60001d0ed20"
}

Authorizations

Authorization
string
header
required

The Tyk Dashboard API Access Credentials

Path Parameters

assetID
string
required

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

Response

Asset fetched.

_id
string

database id of asset

Example:

"659b9613a1ed7ef7afdccb9d"

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

custom id of asset that can be provided while creation/updating.

Example:

"my-unique-template-id"

kind
enum<string>
default:oas-template

the asset type, which is set to oas-template

Available options:
oas-template
Example:

"oas-template"

last_updated
string<date-time>

last updated time stamp

Example:

"2024-01-10T08:48:36.183Z"

name
string

human-readable name for the template

org_id
string