ASDinCloudDocs
API ReferenceMetadata keys

Metadata keys

View as Markdown

The metadata key object

View as Markdown

A metadata key contains its normalized name and display position.

Attributes

idinteger
Identifier assigned by the API.
keystringRequired
Unique name, up to 255 characters. Leading and trailing whitespace is removed, and the key is lowercased.
sort_orderinteger
Display position in the catalog.

List metadata keys

View as Markdown
GET/api/v1/metadata-keys

Lists the metadata keys in display order.

Permissions

Send your API key in X-API-Key. Required permissions are Settings → Read, or Write on Athletes, Parents, Coaches, Directors, or Staff.

Returns

Returns all keys in data.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.

Create a metadata key

View as Markdown
POST/api/v1/metadata-keys

Adds a metadata key to the catalog.

Permissions

Send your API key in X-API-Key. Required permissions are Settings → Write.

Body parameters

keystringRequired
Unique name, up to 255 characters. Leading and trailing whitespace is removed, and the key is lowercased.

Returns

Returns the new catalog entry.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
422
One or more fields failed validation.

Update a metadata key

View as Markdown
POST/api/v1/metadata-keys/{id}

Renames an existing metadata key.

Permissions

Send your API key in X-API-Key. Required permissions are Settings → Write.

Path parameters

idintegerRequired
ID of the metadata key.

Body parameters

keystringRequired
Unique name, up to 255 characters. Leading and trailing whitespace is removed, and the key is lowercased.

Returns

Returns the renamed entry.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
422
The key is missing, invalid, or already used.

Reorder metadata keys

View as Markdown
POST/api/v1/metadata-keys/reorder

Sets the display order of all metadata keys.

Permissions

Send your API key in X-API-Key. Required permissions are Settings → Write.

Body parameters

idsarray of integersRequired
All current catalog IDs in the desired order.

Returns

Returns confirmation that the ordering was saved.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
422
One or more fields failed validation.

Delete a metadata key

View as Markdown
DELETE/api/v1/metadata-keys/{id}

Removes a metadata key from the catalog.

Permissions

Send your API key in X-API-Key. Required permissions are Settings → Write.

Path parameters

idintegerRequired
ID of the metadata key.

Returns

Returns confirmation that the key was removed from the catalog.

Errors

401
The API key is missing or invalid.
403
The API key lacks the required permission.
404
The requested record was not found.