Maton

Get Code

GET/functions/{function_id}/code

Authorization

bearerAuth
AuthorizationBearer <token>

Your Maton API key, sent as Authorization: Bearer <MATON_API_KEY>. Create one at https://maton.ai/settings.

In: header

Path Parameters

function_id*string

The function's unique identifier.

Query Parameters

version?integer

Version to download. Defaults to the version currently serving traffic.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET \  "https://api.maton.ai/functions/{function_id}/code?version=2" \  -H "Authorization: Bearer $MATON_API_KEY"
{
  "download_url": "https://maton-function-code.s3.amazonaws.com/...",
  "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "size": 412
}
{
  "message": "Invalid app name.",
  "type": "Bad Request",
  "code": 400
}
{
  "message": "Invalid API key.",
  "type": "Unauthorized",
  "code": 401
}
{
  "message": "Resource not found.",
  "type": "Not Found",
  "code": 404
}
{
  "message": "Too many requests.",
  "type": "Too Many Requests",
  "code": 429
}
{
  "message": "Internal server error.",
  "type": "Internal Server Error",
  "code": 500
}