Skip to main content
PUT
/
workspace
/
{workspace_id}
/
apigroup
/
{apigroup_id}
/
api
/
{api_id}
Update API endpoint code, settings, and authentication rules
curl --request PUT \
  --url https://x8ki-letl-twmt.n7.xano.io/api:meta/workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: text/x-xanoscript' \
  --data 'query foo verb=GET {
  input {
    int score
  }
  stack {
    var $x1 {
      value = $input.score + 1
    }
  }
  response {
    value = $x1
  }
}
'
{}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspace_id
integer
required
apigroup_id
integer
required
api_id
integer
required

Query Parameters

publish
boolean
default:true

Body

The body is of type string.

Example:

"query foo verb=GET {\n input {\n int score\n }\n stack {\n var $x1 {\n value = $input.score + 1\n }\n }\n response {\n value = $x1\n }\n}\n"

Response

Success!

I