Assets

Create asset schema

Create a schema asset.

The schema data can either be fetched from a URL, uploaded from a file, or sent inline as raw content.

Fetch example:

{
  "asset_type": "SCHEMA",
  "fetch": {
    "url": "https://api.example.com/v1"
  }
}

Upload example:

The file should first be uploaded to the Escape Platform using the upload endpoint.

The upload endpoint returns an id that should be used in the temporaryObjectKey field.

{
  "asset_type": "SCHEMA",
  "upload": {
    "temporaryObjectKey": "00000000-0000-0000-0000-000000000000"
  }
}

Inline content example:

Send the raw schema content directly (at most 2 MB) when the caller cannot PUT to the pre-signed upload URL. The content is stored and converted with the same BUILD_SCHEMA workflow. The response is the created schema asset; its id is the schemaId used to attach the schema to a profile.

{
  "asset_type": "SCHEMA",
  "content": "{ \"openapi\": \"3.0.0\", ... }",
  "contentType": "application/json",
  "filename": "schema.json"
}
post/assets/schema

Request

  • Base URL
    https://public.escape.tech/v3
  • Auth
    API key in header X-ESCAPE-API-KEY

Request body

OR
OR

Example request

{
  "name": "My Schema",
  "fetch": {
    "url": "https://api.example.com/v1",
    "proxyId": "00000000-0000-0000-0000-000000000000",
    "defaultProxyType": "PRIVATE"
  },
  "authentication": {
    "users": [
      {
        "name": "public"
      }
    ]
  },
  "authenticationStr": "{\"users\":[{\"name\":\"public\"}]}"
}

Response

OK

idstring uuid required

The id of the asset

class'API_SERVICE' | 'CDN' | 'CLOUD_COMPONENT' | 'CLOUD_HOSTING' | 'CODE_PROJECT' | 'CSPM' | 'DEV_TOOLS' | 'FRONTEND' | 'HOST' | 'MOBILE_APP' | 'NETWORK' | 'REPOSITORY' | 'SCHEMA' | 'SOURCE_CODE_MANAGEMENT' | 'TECHNOLOGY' required
type'APK' | 'AWS_LAMBDA' | 'BITBUCKET_REPOSITORY' | 'BURPSUITE_EXPORT' | 'CODE_PROJECT' | 'DNS' | 'GITHUB_REPOSITORY' | 'GITLAB_REPOSITORY' | 'GRAPHQL' | 'GRAPHQL_SCHEMA' | 'GRPC' | 'HAR_EXPORT' | 'INSOMNIA' | 'IPV4' | 'IPV4_RANGE' | 'IPV6' | 'MCP' | 'OPENAPI' | 'PACKAGE' | 'POSTMAN_COLLECTION' | 'POSTMAN_ENVIRONMENT' | 'REST' | 'SOAP' | 'SOFTWARE' | 'WEBAPP' | 'WEBSOCKET' | 'WP_JSON' required
namestring required

The name of the asset

externalUrlstring nullable required

The external url of the asset

faviconUrlstring nullable required

The favicon url of the asset

descriptionstring nullable required

The description of the asset

createdAtstring required

The date and time the asset was created

lastSeenAtstring required

The date and time the asset was last seen

scheduledForDeletionAtstring nullable required

The date and time the asset is scheduled for deletion

status'DEPRECATED' | 'FALSE_POSITIVE' | 'MONITORED' | 'OUT_OF_SCOPE' | 'THIRD_PARTY' required

The status of the asset

ownersstring[]

The owners of the asset

risksstring[] required

The risks of the asset

projectIdsstring[] required

IDs of the projects this asset is assigned to

schemaUrlstring nullable required

Time-limited HTTPS URL for schema-class assets; null for other asset classes

rawDataunknown
metadatastring[]

Metadata flags for the asset

Changes

No recorded changes to this operation across all 1 revision of this API.