Metadata API
Last updated
Was this helpful?
Last updated
Was this helpful?
The Metadata API is in beta and is subject to changes including access.
The Metadata API (Beta) enables you to interact with your Xano workspace schema and content programmatically. The Metadata API includes a comprehensive collection of API endpoints designed to add and modify database tables, schemas, and more.
The Metadata API is also used in some cases to facilitate an integration with Xano by providing the integration partner with your Metadata API access token.
An access token is required for any request you send to the Metadata API.
By default, Xano will revoke your Metadata API access token after 7 days, which means if you need to access the API again, you would have to generate a new token.
You can choose your own expiry duration; anything from 1 hour to never expire.
Use caution when defining extended expiry or setting tokens to never expire. Token rotation is good security practice.
You can always revoke a token at any time.
The scopes tell Xano what this token has access to. Each scope has 4 options:
C (Create) - Determines whether or not this token can create new data
R (Read) - Determines whether or not this token can read existing data
U (Update) - Determines whether or not this token can update existing data
D (Delete) - Determines whether or not this token can delete data.
Hint
You can hover over each permission to quickly add or remove all four types of scope.
Each scope has their own API endpoints associated with them. If you aren't sure which scopes you need for this token, use the reference below for additional information.
Database
Access any of the content in your Xano database
Content
Access any content outside of the database or function stacks, such as branches, data sources, and realtime
Live Data Source
Access the data inside of your currently live data source
API Groups
Access API Groups and APIs
Functions
Access custom functions
Addons
Access addons
Task
Access background tasks
Files
Access file storage
Request History
Access request history
The token should be sent as a header in the following format:
When you access the metadata API panel, you can review all of your currently issued tokens and their scopes.
By choosing a token and clicking you can immediately revoke that token from use.
The Account API allows you access to various settings and information about your Xano account.
Please use extreme caution when sharing your Metadata API access tokens, as they can provide access to all of your Xano data.
The Instance API allows you to access data inside of your Xano instances, such as your database, files, and function stacks.
The Metadata API is flexible regarding sending input values. You only need to send the values required to process your request. For example, if you are updating a schema and want to just update the name, then you only need to send the updated name and the other metadata of the schema will remain unchanged.
For partners wanting an easier way to integrate, it may be useful to start out with the Account API. This way the only prompt from the user will be to get their access token, and then you can use the Account API to get a list of the user's instances, leading to the Instance API for workspaces, tables, and APIs.
browse workspace functions Authentication: required Required API Scope: Workspace Function: Read
created_at
, updated_at
, name
asc
, desc
delete workspace API Authentication: required Required API Scope: Workspace Api: Delete
browse workspace API groups Authentication: required Required API Scope: Workspace Api: Read
created_at
, updated_at
, name
asc
, desc
browse API's in an API group Authentication: required Required API Scope: Workspace Api: Read
created_at
, updated_at
, name
asc
, desc
update settings on the snippet Authentication: required
public
, link
, token
add workspace function Authentication: required Required API Scope: Workspace Function: Create
update workspace function Authentication: required Required API Scope: Workspace Function: Update
update workspace function security settings Authentication: required Required API Scope: Workspace Function: Update
update workspace api Authentication: required Required API Scope: Workspace Api: Update
GET
, POST
, DELETE
, PUT
, PATCH
, HEAD
add workspace API Authentication: required Required API Scope: Workspace Api: Create
GET
, POST
, DELETE
, PUT
, PATCH
, HEAD
update workspace api security settings Authentication: required Required API Scope: Workspace Api: Update
add workspace API group Authentication: required Required API Scope: Workspace Api: Create
update workspace API group Authentication: required Required API Scope: Workspace Api: Update
update workspace API group security settings Authentication: required Required API Scope: Workspace Api: Update
update workspace data source Authentication: required Required API Scope: Instance Workspace: Update
create workspace data source Authentication: required Required API Scope: Instance Workspace: Create
Leave the branch
parameter empty to indicate the current live branch. password
is optional. If provided, will encrypt the export and will be required when importing the file.
Required API Scope:
Instance Workspace: Read
Leave the branch
parameter empty to indicate the current live branch. password
is optional. If provided, will encrypt the export and will be required when importing the file.
Required API Scope:
Instance Workspace: Read
delete table content Authentication: required Required API Scope: Workspace Content: Delete
get table content Authentication: required Required API Scope: Workspace Content: Read
browse table content Authentication: required Required API Scope: Workspace Content: Read
delete table index Authentication: required Required API Scope: Workspace Database: Delete
delete a specific schema element within workspace table Authentication: required Required API Scope: Workspace Database: Delete
get a specific schema element within workspace table Authentication: required Required API Scope: Workspace Database: Read
browse workspace table's schema Authentication: required Required API Scope: Workspace Database: Read
delete workspace table and all of its content Authentication: required Required API Scope: Workspace Database: Delete
browse workspace tables Authentication: required Required API Scope: Workspace Database: Read
created_at
, updated_at
, name
asc
, desc
browse workspace tasks Authentication: required Required API Scope: Workspace Task: Read
created_at
, updated_at
, name
asc
, desc
list files within workspace Authentication: required Required API Scope: Workspace File: Read
public
, private
created_at
, name
, size
, mime
asc
, desc
delete file within workspace Authentication: required Required API Scope: Workspace File: Delete
No body
update workspace table's autocomplete Authentication: required Required API Scope: Workspace Database: Update
The request body should contain an array of row_ids, where each id identifies a row to be deleted. Required API Scope: Workspace Content: Delete
The request body should contain an array of items, where each item represents a row to be updated. For each row, provide the row_id and updates array that specifies the columns (path) to update and the new values (value). The example below is assuming that the table being modified has a column labeled name.
Required API Scope: Workspace Content: Update
Each table has unique schema, which means that the request body should be an array of objects with the schema relevant to the table being used. The example below is assuming that the table has a column labeled "name".
Required API Scope: Workspace Content: Create
Provide search criteria to delete all matching rows. Required API Scope: Workspace Content: Delete
Provide search and update objects with path and new value to patch rows matching search criteria. Required API Scope: Workspace Content: Update
search table content with support for complex filtering and sorting Authentication: required Required API Scope: Workspace Content: Read
Each table has unique schema, which means that the request body should be updated with the schema relevant to the table being used. The example below is assuming that the table has a column labeled "name".
Required API Scope: Workspace Content: Update
{"name":"test name"}
Each table has unique schema, which means that the request body should be updated with the schema relevant to the table being used. The example below is assuming that the table has a column labeled "name".
Required API Scope: Workspace Content: Create
{"name":"test name"}
create a btree table index Authentication: required Required API Scope: Workspace Database: Create
create a search table index Authentication: required Required API Scope: Workspace Database: Create
simple
, arabic
, danish
, dutch
, english
, finnish
, french
, german
, hungarian
, indonesian
, irish
, italian
, lithuanian
, nepali
, norwegian
, portuguese
, romanian
, russian
, spanish
, swedish
, tamil
, turkish
create a spatial table index Authentication: required Required API Scope: Workspace Database: Create
create a unique table index Authentication: required Required API Scope: Workspace Database: Create
Options include vector_ip_ops
(Inner Product), vector_cosine_ops
(Cosine), vector_l1_ops
(L1 Distance), vector_l2_ops
(L2 Distance)
Required API Scope:
Workspace Database: Create
replace all of the indexes of a workspace table Authentication: required Required API Scope: Workspace Database: Update
update workspace table's metadata Authentication: required Required API Scope: Workspace Database: Update
rename a column within the schema of a workspace table Authentication: required Required API Scope: Workspace Database: Update
create attachment schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create audio schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create bool schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create date schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create decimal schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create email schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create enum schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create geo_linestring schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create geo_multilinestring schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create geo_multipoint schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create geo_multipolygon schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create geo_point schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create geo_polygon schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create image schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create int schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create json schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create object schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create password reference schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create table reference schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create table reference schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create text schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
, plaintext
, yaml
, html
, xml
, markdown
create timestamp schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create uuid schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create vector schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
create video schema within a workspace table Authentication: required Required API Scope: Workspace Database: Create
public
, private
, internal
single
, list
replace the entire schema of a workspace table Authentication: required Required API Scope: Workspace Database: Update
update workspace table's security settings Authentication: required Required API Scope: Workspace Database: Update
truncate table's content and optionally reset the primary key Authentication: required Required API Scope: Workspace Content: Delete
This endpoint can create a complete table in a single API request, as long as all values below are fully fleshed out. If you want to create the table in multiple steps, then just fill out the name field as shown in the example. Required API Scope: Workspace Database: Create
update workspace realtime settings Authentication: required Required API Scope: Instance Workspace: Update
add workspace task Authentication: required Required API Scope: Workspace Task: Create
update workspace task Authentication: required Required API Scope: Workspace Task: Update
update workspace task security settings Authentication: required Required API Scope: Workspace Task: Update
upload file to workspace Authentication: required Required API Scope: Workspace File: Create
image
, video
, audio
public
, private
bulk delete files within workspace Authentication: required Required API Scope: Workspace File: Delete
No body