> For the complete documentation index, see [llms.txt](https://academy.shade.inc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.shade.inc/developers/organize/metadata.md).

# Metadata

Metadata attributes are the fields on a drive, such as Status, Client, or Shoot Date. Each asset holds a value for each attribute.

1. List the drive's attributes, with their IDs and select options, with `GET /workspaces/drives/{drive_id}/metadata`.
2. Set one value with `PUT /assets/{asset_id}/metadata/{metadata_attribute_id}/value`, or many at once with `PUT /assets/metadata/values`.

The value format depends on the attribute's `value_type`: text for `str`, an option ID for `single_select`, a list of option IDs for `multi_select`, an ISO 8601 string for `datetime`, and so on. The single-value route returns `400` if nothing was updated. The bulk route skips updates it can't apply, so check `updated_metadata_attribute_ids` in its response. See the [Metadata guide](https://academy.shade.inc/developers/using-the-api/metadata-guide) for every type.

## Get the metadata for an asset

> Get the metadata for an asset

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"metadata","description":"Metadata attributes are the fields on a drive, such as Status, Client, or\nShoot Date. Each asset holds a value for each attribute.\n\n1. List the drive's attributes, with their IDs and select options, with\n   `GET /workspaces/drives/{drive_id}/metadata`.\n2. Set one value with `PUT /assets/{asset_id}/metadata/{metadata_attribute_id}/value`,\n   or many at once with `PUT /assets/metadata/values`.\n\nThe value format depends on the attribute's `value_type`: text for `str`, an\noption ID for `single_select`, a list of option IDs for `multi_select`, an ISO\n8601 string for `datetime`, and so on. The single-value route returns `400`\nif nothing was updated. The bulk route skips updates it can't apply, so check\n`updated_metadata_attribute_ids` in its response. See the\n[Metadata guide](https://academy.shade.inc/developers/using-the-api/metadata-guide)\nfor every type."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"JsonValue-Output":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"object"},{"type":"null"}]},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/assets/{asset_id}/metadata":{"get":{"tags":["metadata"],"summary":"Get the metadata for an asset","description":"Get the metadata for an asset","operationId":"getAssetMetadata","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The asset id","description":"The asset to get the metadata for"},"description":"The asset to get the metadata for"},{"name":"drive_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id","description":"The id of the drive this asset is in"},"description":"The id of the drive this asset is in"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"}}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## PUT /assets/{asset\_id}/metadata/{metadata\_attribute\_id}/value

> Update an asset's metadata value

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"metadata","description":"Metadata attributes are the fields on a drive, such as Status, Client, or\nShoot Date. Each asset holds a value for each attribute.\n\n1. List the drive's attributes, with their IDs and select options, with\n   `GET /workspaces/drives/{drive_id}/metadata`.\n2. Set one value with `PUT /assets/{asset_id}/metadata/{metadata_attribute_id}/value`,\n   or many at once with `PUT /assets/metadata/values`.\n\nThe value format depends on the attribute's `value_type`: text for `str`, an\noption ID for `single_select`, a list of option IDs for `multi_select`, an ISO\n8601 string for `datetime`, and so on. The single-value route returns `400`\nif nothing was updated. The bulk route skips updates it can't apply, so check\n`updated_metadata_attribute_ids` in its response. See the\n[Metadata guide](https://academy.shade.inc/developers/using-the-api/metadata-guide)\nfor every type."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"UpdateAssetMetadataValueRequest":{"properties":{"drive_id":{"type":"string","format":"uuid","title":"The drive id","description":"The id of the drive this asset is in"},"metadata_attribute_value":{"anyOf":[{"$ref":"#/components/schemas/JsonValue-Input"},{"type":"null"}],"title":"Metadata Attribute Value","description":"The new value for the metadata attribute. Not passing this will remove the value."}},"type":"object","required":["drive_id"],"title":"UpdateAssetMetadataValueRequest"},"JsonValue-Input":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"object"},{"type":"null"}]},"AssetDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"path":{"type":"string","title":"Path"},"name":{"type":"string","title":"Name"},"extension":{"type":"string","title":"Extension"},"updated":{"type":"string","format":"date-time","title":"Updated"},"created":{"type":"string","format":"date-time","title":"Created"},"type":{"$ref":"#/components/schemas/AssetType"},"size_bytes":{"type":"integer","title":"Size Bytes"},"stack_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Stack Id"},"stack_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stack Number"},"is_fs_draft_blob":{"type":"boolean","title":"Is Fs Draft Blob"},"is_fs_null_blob":{"type":"boolean","title":"Is Fs Null Blob"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rating"},"ai_indexed":{"type":"boolean","title":"Ai Indexed"},"system_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"System Metadata","default":{}},"custom_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Metadata","default":{}},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"palette":{"items":{"items":{"type":"integer"},"type":"array"},"type":"array","title":"Palette"},"ocr":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ocr"},"transcription_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Transcription Id"},"faces_present":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Faces Present"},"content_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Content Length"},"comment_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Comment Count"},"preview_job_state":{"$ref":"#/components/schemas/JobState"},"metadata_job_state":{"$ref":"#/components/schemas/JobState"},"custom_metadata_job_state":{"$ref":"#/components/schemas/JobState"},"core_vision_job_state":{"$ref":"#/components/schemas/JobState"},"color_palette_job_state":{"$ref":"#/components/schemas/JobState"},"core_audio_job_state":{"$ref":"#/components/schemas/JobState"},"audio_job_state":{"$ref":"#/components/schemas/JobState"},"facial_recognition_job_state":{"$ref":"#/components/schemas/JobState"},"proxy_job_state":{"$ref":"#/components/schemas/JobState"},"audio_proxy_job_state":{"$ref":"#/components/schemas/JobState"},"transcription_job_state":{"$ref":"#/components/schemas/JobState"},"scrub_sheet_job_state":{"$ref":"#/components/schemas/JobState"},"objects":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Objects"},"texture_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Texture Data"},"integration_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Integration Data"},"preview_images":{"items":{"$ref":"#/components/schemas/PreviewDTO"},"type":"array","title":"Preview Images"},"custom_thumbnail":{"anyOf":[{"type":"string"},{"type":"null"}]},"proxy":{"anyOf":[{"$ref":"#/components/schemas/ProxyDTO"},{"type":"null"}]},"audio_proxy":{"anyOf":[{"$ref":"#/components/schemas/ProxyDTO"},{"type":"null"}]},"scrub_sheet":{"anyOf":[{"$ref":"#/components/schemas/ScrubSheetDTO"},{"type":"null"}]},"grid_scrub_sheet":{"anyOf":[{"$ref":"#/components/schemas/ScrubSheetDTO"},{"type":"null"}]}},"type":"object","required":["id","drive_id","path","name","extension","updated","created","type","size_bytes","is_fs_draft_blob","is_fs_null_blob","ai_indexed","palette","preview_job_state","metadata_job_state","custom_metadata_job_state","core_vision_job_state","color_palette_job_state","core_audio_job_state","facial_recognition_job_state","proxy_job_state","audio_proxy_job_state","transcription_job_state","scrub_sheet_job_state","preview_images"],"title":"AssetDTO","description":"Full asset DTO with relationship fields that require eager loading."},"AssetType":{"type":"string","enum":["IMAGE","VIDEO","AUDIO","DOCUMENT","HDR","HDRI","PHOTOSHOP","ILLUSTRATOR","EXR","OBJECT","VECTOR","OTHER","MAYA","MAX","BLENDER","HOUDINI","UNREAL","UNITY","AFTER_EFFECTS","MOGRT"],"title":"AssetType"},"JobState":{"type":"string","enum":["NOT_STARTED","IN_PROGRESS","COMPLETED","FAILED","INSUFFICIENT_CREDITS"],"title":"JobState","description":"The state of a processing job on an asset, such as previews or transcription."},"PreviewDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"frame":{"type":"integer","title":"Frame"},"signed_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signed Url"}},"type":"object","required":["id","frame"],"title":"PreviewDTO"},"ProxyDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"}},"type":"object","required":["id"],"title":"ProxyDTO"},"ScrubSheetDTO":{"properties":{"preview_width":{"type":"integer","title":"Preview Width"},"preview_height":{"type":"integer","title":"Preview Height"},"columns":{"type":"integer","title":"Columns"},"rows":{"type":"integer","title":"Rows"},"interval":{"type":"number","title":"Interval"},"total_frames":{"type":"integer","title":"Total Frames"},"scrub_sheets":{"items":{"type":"string"},"type":"array","title":"Scrub Sheets"}},"type":"object","required":["preview_width","preview_height","columns","rows","interval","total_frames","scrub_sheets"],"title":"ScrubSheetDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/assets/{asset_id}/metadata/{metadata_attribute_id}/value":{"put":{"tags":["metadata"],"summary":"Update an asset's metadata value","operationId":"updateAssetMetadataValue","parameters":[{"name":"asset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The asset id","description":"The id of the asset to be updated"},"description":"The id of the asset to be updated"},{"name":"metadata_attribute_id","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"string","format":"uuid"}],"title":"Metadata Attribute ID","description":"The id of the metadata attribute to update"},"description":"The id of the metadata attribute to update"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssetMetadataValueRequest"}}}},"responses":{"200":{"description":"The updated asset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Bulk update asset metadata attributes

> Either pass in asset\_ids/metadata\_attributes OR assets.

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"metadata","description":"Metadata attributes are the fields on a drive, such as Status, Client, or\nShoot Date. Each asset holds a value for each attribute.\n\n1. List the drive's attributes, with their IDs and select options, with\n   `GET /workspaces/drives/{drive_id}/metadata`.\n2. Set one value with `PUT /assets/{asset_id}/metadata/{metadata_attribute_id}/value`,\n   or many at once with `PUT /assets/metadata/values`.\n\nThe value format depends on the attribute's `value_type`: text for `str`, an\noption ID for `single_select`, a list of option IDs for `multi_select`, an ISO\n8601 string for `datetime`, and so on. The single-value route returns `400`\nif nothing was updated. The bulk route skips updates it can't apply, so check\n`updated_metadata_attribute_ids` in its response. See the\n[Metadata guide](https://academy.shade.inc/developers/using-the-api/metadata-guide)\nfor every type."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"BulkUpdateAssetMetadataAttributesRequest":{"properties":{"asset_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"The asset id","description":"The id of the assets to be updated"},"metadata_attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/BulkMetadataAttributeUpdate"},"type":"array"},{"type":"null"}],"title":"Metadata Attribute ID","description":"The id and values of the metadata attributes to update"},"asset_ids_with_metadata_attributes":{"anyOf":[{"items":{"$ref":"#/components/schemas/BulkMetadataAttributeUpdatePerAsset"},"type":"array"},{"type":"null"}],"title":"Asset to be modified with the corresponding metadata","description":"The asset ids and their corresponding metadata attributes to update"},"drive_id":{"type":"string","format":"uuid","title":"The drive id","description":"The id of the drive this asset is in"}},"type":"object","required":["drive_id"],"title":"BulkUpdateAssetMetadataAttributesRequest"},"BulkMetadataAttributeUpdate":{"properties":{"id":{"type":"string","title":"Id"},"value":{"$ref":"#/components/schemas/JsonValue-Input"},"append":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Append","default":false,"description":"For multi-select attributes, add these options to the asset's current ones instead of replacing them."}},"type":"object","required":["id","value"],"title":"BulkMetadataAttributeUpdate"},"JsonValue-Input":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"object"},{"type":"null"}]},"BulkMetadataAttributeUpdatePerAsset":{"properties":{"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"metadata_attributes":{"items":{"$ref":"#/components/schemas/BulkMetadataAttributeUpdate"},"type":"array","title":"Metadata Attributes"}},"type":"object","required":["asset_id","metadata_attributes"],"title":"BulkMetadataAttributeUpdatePerAsset"},"BulkMetadataAttributeUpdateResponseDTO":{"properties":{"asset_id":{"type":"string","format":"uuid","title":"Asset Id"},"updated_metadata_attribute_ids":{"items":{"type":"string"},"type":"array","title":"Updated Metadata Attribute Ids"}},"type":"object","required":["asset_id","updated_metadata_attribute_ids"],"title":"BulkMetadataAttributeUpdateResponseDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/assets/metadata/values":{"put":{"tags":["metadata"],"summary":"Bulk update asset metadata attributes","description":"Either pass in asset_ids/metadata_attributes OR assets.","operationId":"bulkUpdateAssetMetadataAttributes","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateAssetMetadataAttributesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BulkMetadataAttributeUpdateResponseDTO"}}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /workspaces/drives/{drive\_id}/metadata/assets/columns

> Add metadata columns to a drive's asset metadata schema

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"metadata","description":"Metadata attributes are the fields on a drive, such as Status, Client, or\nShoot Date. Each asset holds a value for each attribute.\n\n1. List the drive's attributes, with their IDs and select options, with\n   `GET /workspaces/drives/{drive_id}/metadata`.\n2. Set one value with `PUT /assets/{asset_id}/metadata/{metadata_attribute_id}/value`,\n   or many at once with `PUT /assets/metadata/values`.\n\nThe value format depends on the attribute's `value_type`: text for `str`, an\noption ID for `single_select`, a list of option IDs for `multi_select`, an ISO\n8601 string for `datetime`, and so on. The single-value route returns `400`\nif nothing was updated. The bulk route skips updates it can't apply, so check\n`updated_metadata_attribute_ids` in its response. See the\n[Metadata guide](https://academy.shade.inc/developers/using-the-api/metadata-guide)\nfor every type."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"AddColumnsRequest":{"properties":{"columns":{"items":{"$ref":"#/components/schemas/ColumnAddInput"},"type":"array","minItems":1,"title":"Columns"}},"additionalProperties":false,"type":"object","required":["columns"],"title":"AddColumnsRequest"},"ColumnAddInput":{"properties":{"column_name":{"type":"string","title":"Column Name"},"column_type":{"$ref":"#/components/schemas/DatabaseColumnType","description":"The field type: `str`, `single_select`, `multi_select`, `int`, `float`, `bool`, `datetime`,\n`rating`, `relation`, or `lookup`. The `type_*` values are internal."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"hidden":{"type":"boolean","title":"Hidden","default":false},"add_new_options":{"type":"boolean","title":"Add New Options","default":false,"description":"For AI-filled select fields, let the AI create options that don't exist yet."},"automated":{"type":"boolean","title":"Automated","default":false,"description":"Have Shade's AI fill in this field, guided by `prompt`."},"locked":{"type":"boolean","title":"Locked","default":false},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"default_value":{"anyOf":[{"$ref":"#/components/schemas/JsonValue-Input"},{"type":"null"}]},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/SelectOptionInput"},"type":"array"},{"type":"null"}],"title":"Options"},"relation_config":{"anyOf":[{"$ref":"#/components/schemas/RelationConfigInput"},{"type":"null"}]},"lookup_config":{"anyOf":[{"$ref":"#/components/schemas/LookupConfig"},{"type":"null"}]},"restrict_to_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/AssetType"},"type":"array"},{"type":"null"}],"title":"Restrict To Types"}},"additionalProperties":false,"type":"object","required":["column_name","column_type"],"title":"ColumnAddInput","description":"Unified input for adding a column to either an asset drive (system db)\nor a custom-object database. Service impls reject fields that don't make\nsense for their object type (e.g. custom-object impl rejects\n``lookup_config``)."},"DatabaseColumnType":{"type":"string","enum":["type_number","type_text_plain","type_text_tsvector_english","type_text_tsvector_english_vector_1024","type_vector_256","type_vector_512","type_jsonb_tsvector_english","type_jsonb_tsvector_english_vector_768","str","single_select","multi_select","float","int","bool","datetime","rating","relation","lookup"],"title":"DatabaseColumnType"},"JsonValue-Input":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"object"},{"type":"null"}]},"SelectOptionInput":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color","default":""},"user_defined":{"type":"boolean","title":"User Defined","default":false},"archived":{"type":"boolean","title":"Archived","default":false}},"additionalProperties":false,"type":"object","required":["name"],"title":"SelectOptionInput","description":"One select option as stored. ``id`` is server-assigned on create when\nthe client omits it; ``archived`` lets clients tombstone an option without\na separate delete call."},"RelationConfigInput":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"inverse":{"anyOf":[{"$ref":"#/components/schemas/InverseInput"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["target"],"title":"RelationConfigInput"},"AssetTarget":{"properties":{"kind":{"type":"string","const":"asset","title":"Kind","default":"asset"}},"type":"object","title":"AssetTarget"},"CustomObjectTarget":{"properties":{"kind":{"type":"string","const":"custom_object","title":"Kind","default":"custom_object"},"database_id":{"type":"string","format":"uuid","title":"Database Id"}},"type":"object","required":["database_id"],"title":"CustomObjectTarget"},"IndividualTarget":{"properties":{"kind":{"type":"string","const":"individual","title":"Kind","default":"individual"}},"type":"object","title":"IndividualTarget"},"UserTarget":{"properties":{"kind":{"type":"string","const":"user","title":"Kind","default":"user"}},"type":"object","title":"UserTarget"},"InverseInput":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"InverseInput"},"LookupConfig":{"properties":{"path":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":3,"minItems":1,"title":"Path"},"path_inverse_flags":{"items":{"type":"boolean"},"type":"array","title":"Path Inverse Flags"},"target_column_id":{"type":"string","format":"uuid","title":"Target Column Id"},"target_value_type":{"type":"string","title":"Target Value Type","default":""},"aggregation":{"$ref":"#/components/schemas/LookupAggregation","default":"all"}},"type":"object","required":["path","target_column_id"],"title":"LookupConfig","description":"``path`` is the ordered list of hop ids the user clicked. Each entry\nmay be a real forward ``DatabaseColumnModel.id`` or an\n``inverse_database_columns.id`` synthetic id — the server canonicalizes\nto forward column ids at write time and persists a parallel\n``path_inverse_flags`` derived from which form each entry was. Clients\ndo not need to set ``path_inverse_flags`` on writes; any value supplied\nis ignored and overwritten by the resolver. On reads it reflects the\nstored direction array, parallel to ``path``.\n\n``target_column_id`` is the scalar attribute on the final related object.\n``target_value_type`` is ignored on the request side (the server reads it\nfrom the target column) — the default empty string just lets the request\nDTO round-trip with a placeholder. ``aggregation`` defaults to ALL when\nomitted to keep wire-compat with frontends that don't set it explicitly."},"LookupAggregation":{"type":"string","enum":["first","all","count","sum","avg","min","max"],"title":"LookupAggregation"},"AssetType":{"type":"string","enum":["IMAGE","VIDEO","AUDIO","DOCUMENT","HDR","HDRI","PHOTOSHOP","ILLUSTRATOR","EXR","OBJECT","VECTOR","OTHER","MAYA","MAX","BLENDER","HOUDINI","UNREAL","UNITY","AFTER_EFFECTS","MOGRT"],"title":"AssetType"},"RealColumnResponse":{"properties":{"kind":{"type":"string","const":"real","title":"Kind","default":"real"},"id":{"type":"string","format":"uuid","title":"Id"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"column_human_id":{"type":"string","title":"Column Human Id"},"column_name":{"type":"string","title":"Column Name"},"column_type":{"type":"string","title":"Column Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"hidden":{"type":"boolean","title":"Hidden"},"archive":{"type":"boolean","title":"Archive"},"add_new_options":{"type":"boolean","title":"Add New Options"},"automated":{"type":"boolean","title":"Automated"},"locked":{"type":"boolean","title":"Locked"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"default_value":{"anyOf":[{"$ref":"#/components/schemas/JsonValue-Output"},{"type":"null"}]},"options":{"items":{"$ref":"#/components/schemas/SelectOptionResponse"},"type":"array","title":"Options"},"relation_target":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},{"type":"null"}],"title":"Relation Target"},"inverse":{"anyOf":[{"$ref":"#/components/schemas/InverseResponse"},{"type":"null"}]},"lookup_config":{"anyOf":[{"$ref":"#/components/schemas/LookupConfig"},{"type":"null"}]},"restrict_to_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/AssetType"},"type":"array"},{"type":"null"}],"title":"Restrict To Types"}},"type":"object","required":["id","database_id","drive_id","column_human_id","column_name","column_type","hidden","archive","add_new_options","automated","locked"],"title":"RealColumnResponse","description":"Wire shape for a real (DB-backed) metadata column. ``kind=\"real\"``\ndiscriminates from the synthetic inverse variant — see ``ColumnResponse``."},"JsonValue-Output":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"object"},{"type":"null"}]},"SelectOptionResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color","default":""},"user_defined":{"type":"boolean","title":"User Defined","default":false},"archived":{"type":"boolean","title":"Archived","default":false}},"type":"object","required":["id","name"],"title":"SelectOptionResponse"},"InverseResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["enabled"],"title":"InverseResponse"},"InverseColumnResponse":{"properties":{"kind":{"type":"string","const":"inverse","title":"Kind","default":"inverse"},"id":{"type":"string","format":"uuid","title":"Id"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"column_human_id":{"type":"string","title":"Column Human Id"},"column_name":{"type":"string","title":"Column Name"},"column_type":{"type":"string","title":"Column Type"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"relation_target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Relation Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"paired_to":{"$ref":"#/components/schemas/PairedTo"}},"type":"object","required":["id","database_id","drive_id","column_human_id","column_name","column_type","relation_target","paired_to"],"title":"InverseColumnResponse","description":"Wire shape for a synthetic inverse column — no DB row backs it. Always\na relation surface (``column_type=\"relation\"``); the source side is the\ndatabase that owns the forward column, surfaced via ``paired_to``."},"PairedTo":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"column_id":{"type":"string","format":"uuid","title":"Column Id"},"type_name":{"type":"string","title":"Type Name"},"column_name":{"type":"string","title":"Column Name"}},"type":"object","required":["target","column_id","type_name","column_name"],"title":"PairedTo","description":"``target`` describes the kind that OWNS the forward column; the union\nkeeps room for non-custom-object owners (e.g. future user-source forward\ncolumns)."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/metadata/assets/columns":{"post":{"tags":["metadata"],"summary":"Add metadata columns to a drive's asset metadata schema","operationId":"addAssetColumns","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddColumnsRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/RealColumnResponse"},{"$ref":"#/components/schemas/InverseColumnResponse"}],"discriminator":{"propertyName":"kind","mapping":{"real":"#/components/schemas/RealColumnResponse","inverse":"#/components/schemas/InverseColumnResponse"}}}}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## DELETE /workspaces/drives/{drive\_id}/metadata/assets/columns/{column\_id}

> Delete an asset metadata column

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"metadata","description":"Metadata attributes are the fields on a drive, such as Status, Client, or\nShoot Date. Each asset holds a value for each attribute.\n\n1. List the drive's attributes, with their IDs and select options, with\n   `GET /workspaces/drives/{drive_id}/metadata`.\n2. Set one value with `PUT /assets/{asset_id}/metadata/{metadata_attribute_id}/value`,\n   or many at once with `PUT /assets/metadata/values`.\n\nThe value format depends on the attribute's `value_type`: text for `str`, an\noption ID for `single_select`, a list of option IDs for `multi_select`, an ISO\n8601 string for `datetime`, and so on. The single-value route returns `400`\nif nothing was updated. The bulk route skips updates it can't apply, so check\n`updated_metadata_attribute_ids` in its response. See the\n[Metadata guide](https://academy.shade.inc/developers/using-the-api/metadata-guide)\nfor every type."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/metadata/assets/columns/{column_id}":{"delete":{"tags":["metadata"],"summary":"Delete an asset metadata column","operationId":"deleteAssetColumn","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"column_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The column id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## PATCH /workspaces/drives/{drive\_id}/metadata/assets/columns/{column\_id}

> Update an asset metadata column

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"metadata","description":"Metadata attributes are the fields on a drive, such as Status, Client, or\nShoot Date. Each asset holds a value for each attribute.\n\n1. List the drive's attributes, with their IDs and select options, with\n   `GET /workspaces/drives/{drive_id}/metadata`.\n2. Set one value with `PUT /assets/{asset_id}/metadata/{metadata_attribute_id}/value`,\n   or many at once with `PUT /assets/metadata/values`.\n\nThe value format depends on the attribute's `value_type`: text for `str`, an\noption ID for `single_select`, a list of option IDs for `multi_select`, an ISO\n8601 string for `datetime`, and so on. The single-value route returns `400`\nif nothing was updated. The bulk route skips updates it can't apply, so check\n`updated_metadata_attribute_ids` in its response. See the\n[Metadata guide](https://academy.shade.inc/developers/using-the-api/metadata-guide)\nfor every type."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"ColumnPatchInput":{"properties":{"column_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Column Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"add_new_options":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Add New Options"},"hidden":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hidden"},"archive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archive"},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Locked"},"automated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Automated"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"default_value":{"anyOf":[{"$ref":"#/components/schemas/JsonValue-Input"},{"type":"null"}]},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/SelectOptionInput"},"type":"array"},{"type":"null"}],"title":"Options"},"relation_config":{"anyOf":[{"$ref":"#/components/schemas/RelationConfigInput"},{"type":"null"}]},"rerun_automated":{"type":"boolean","title":"Rerun Automated","default":false}},"additionalProperties":false,"type":"object","title":"ColumnPatchInput","description":"Patch shape. Inspect ``model_fields_set`` to distinguish 'untouched'\nfrom 'explicitly set to null' — service impls only apply fields that were\nactually included in the request body, and return an invalid-input failure\nwhen the body explicitly sets a field that service does not support (e.g.\n``relation_config`` on asset columns)."},"JsonValue-Input":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"object"},{"type":"null"}]},"SelectOptionInput":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color","default":""},"user_defined":{"type":"boolean","title":"User Defined","default":false},"archived":{"type":"boolean","title":"Archived","default":false}},"additionalProperties":false,"type":"object","required":["name"],"title":"SelectOptionInput","description":"One select option as stored. ``id`` is server-assigned on create when\nthe client omits it; ``archived`` lets clients tombstone an option without\na separate delete call."},"RelationConfigInput":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"inverse":{"anyOf":[{"$ref":"#/components/schemas/InverseInput"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["target"],"title":"RelationConfigInput"},"AssetTarget":{"properties":{"kind":{"type":"string","const":"asset","title":"Kind","default":"asset"}},"type":"object","title":"AssetTarget"},"CustomObjectTarget":{"properties":{"kind":{"type":"string","const":"custom_object","title":"Kind","default":"custom_object"},"database_id":{"type":"string","format":"uuid","title":"Database Id"}},"type":"object","required":["database_id"],"title":"CustomObjectTarget"},"IndividualTarget":{"properties":{"kind":{"type":"string","const":"individual","title":"Kind","default":"individual"}},"type":"object","title":"IndividualTarget"},"UserTarget":{"properties":{"kind":{"type":"string","const":"user","title":"Kind","default":"user"}},"type":"object","title":"UserTarget"},"InverseInput":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"InverseInput"},"RealColumnResponse":{"properties":{"kind":{"type":"string","const":"real","title":"Kind","default":"real"},"id":{"type":"string","format":"uuid","title":"Id"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"column_human_id":{"type":"string","title":"Column Human Id"},"column_name":{"type":"string","title":"Column Name"},"column_type":{"type":"string","title":"Column Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"hidden":{"type":"boolean","title":"Hidden"},"archive":{"type":"boolean","title":"Archive"},"add_new_options":{"type":"boolean","title":"Add New Options"},"automated":{"type":"boolean","title":"Automated"},"locked":{"type":"boolean","title":"Locked"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"default_value":{"anyOf":[{"$ref":"#/components/schemas/JsonValue-Output"},{"type":"null"}]},"options":{"items":{"$ref":"#/components/schemas/SelectOptionResponse"},"type":"array","title":"Options"},"relation_target":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},{"type":"null"}],"title":"Relation Target"},"inverse":{"anyOf":[{"$ref":"#/components/schemas/InverseResponse"},{"type":"null"}]},"lookup_config":{"anyOf":[{"$ref":"#/components/schemas/LookupConfig"},{"type":"null"}]},"restrict_to_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/AssetType"},"type":"array"},{"type":"null"}],"title":"Restrict To Types"}},"type":"object","required":["id","database_id","drive_id","column_human_id","column_name","column_type","hidden","archive","add_new_options","automated","locked"],"title":"RealColumnResponse","description":"Wire shape for a real (DB-backed) metadata column. ``kind=\"real\"``\ndiscriminates from the synthetic inverse variant — see ``ColumnResponse``."},"JsonValue-Output":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"object"},{"type":"null"}]},"SelectOptionResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color","default":""},"user_defined":{"type":"boolean","title":"User Defined","default":false},"archived":{"type":"boolean","title":"Archived","default":false}},"type":"object","required":["id","name"],"title":"SelectOptionResponse"},"InverseResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["enabled"],"title":"InverseResponse"},"LookupConfig":{"properties":{"path":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":3,"minItems":1,"title":"Path"},"path_inverse_flags":{"items":{"type":"boolean"},"type":"array","title":"Path Inverse Flags"},"target_column_id":{"type":"string","format":"uuid","title":"Target Column Id"},"target_value_type":{"type":"string","title":"Target Value Type","default":""},"aggregation":{"$ref":"#/components/schemas/LookupAggregation","default":"all"}},"type":"object","required":["path","target_column_id"],"title":"LookupConfig","description":"``path`` is the ordered list of hop ids the user clicked. Each entry\nmay be a real forward ``DatabaseColumnModel.id`` or an\n``inverse_database_columns.id`` synthetic id — the server canonicalizes\nto forward column ids at write time and persists a parallel\n``path_inverse_flags`` derived from which form each entry was. Clients\ndo not need to set ``path_inverse_flags`` on writes; any value supplied\nis ignored and overwritten by the resolver. On reads it reflects the\nstored direction array, parallel to ``path``.\n\n``target_column_id`` is the scalar attribute on the final related object.\n``target_value_type`` is ignored on the request side (the server reads it\nfrom the target column) — the default empty string just lets the request\nDTO round-trip with a placeholder. ``aggregation`` defaults to ALL when\nomitted to keep wire-compat with frontends that don't set it explicitly."},"LookupAggregation":{"type":"string","enum":["first","all","count","sum","avg","min","max"],"title":"LookupAggregation"},"AssetType":{"type":"string","enum":["IMAGE","VIDEO","AUDIO","DOCUMENT","HDR","HDRI","PHOTOSHOP","ILLUSTRATOR","EXR","OBJECT","VECTOR","OTHER","MAYA","MAX","BLENDER","HOUDINI","UNREAL","UNITY","AFTER_EFFECTS","MOGRT"],"title":"AssetType"},"InverseColumnResponse":{"properties":{"kind":{"type":"string","const":"inverse","title":"Kind","default":"inverse"},"id":{"type":"string","format":"uuid","title":"Id"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"column_human_id":{"type":"string","title":"Column Human Id"},"column_name":{"type":"string","title":"Column Name"},"column_type":{"type":"string","title":"Column Type"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"relation_target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Relation Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"paired_to":{"$ref":"#/components/schemas/PairedTo"}},"type":"object","required":["id","database_id","drive_id","column_human_id","column_name","column_type","relation_target","paired_to"],"title":"InverseColumnResponse","description":"Wire shape for a synthetic inverse column — no DB row backs it. Always\na relation surface (``column_type=\"relation\"``); the source side is the\ndatabase that owns the forward column, surfaced via ``paired_to``."},"PairedTo":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"column_id":{"type":"string","format":"uuid","title":"Column Id"},"type_name":{"type":"string","title":"Type Name"},"column_name":{"type":"string","title":"Column Name"}},"type":"object","required":["target","column_id","type_name","column_name"],"title":"PairedTo","description":"``target`` describes the kind that OWNS the forward column; the union\nkeeps room for non-custom-object owners (e.g. future user-source forward\ncolumns)."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/metadata/assets/columns/{column_id}":{"patch":{"tags":["metadata"],"summary":"Update an asset metadata column","operationId":"updateAssetColumn","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"column_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The column id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColumnPatchInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RealColumnResponse"},{"$ref":"#/components/schemas/InverseColumnResponse"}],"discriminator":{"propertyName":"kind","mapping":{"real":"#/components/schemas/RealColumnResponse","inverse":"#/components/schemas/InverseColumnResponse"}}}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Get the metadata attributes for a drive including system attributes

> Get the metadata attributes for a drive including system attributes

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"metadata","description":"Metadata attributes are the fields on a drive, such as Status, Client, or\nShoot Date. Each asset holds a value for each attribute.\n\n1. List the drive's attributes, with their IDs and select options, with\n   `GET /workspaces/drives/{drive_id}/metadata`.\n2. Set one value with `PUT /assets/{asset_id}/metadata/{metadata_attribute_id}/value`,\n   or many at once with `PUT /assets/metadata/values`.\n\nThe value format depends on the attribute's `value_type`: text for `str`, an\noption ID for `single_select`, a list of option IDs for `multi_select`, an ISO\n8601 string for `datetime`, and so on. The single-value route returns `400`\nif nothing was updated. The bulk route skips updates it can't apply, so check\n`updated_metadata_attribute_ids` in its response. See the\n[Metadata guide](https://academy.shade.inc/developers/using-the-api/metadata-guide)\nfor every type."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"MetadataAttribute-Output":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"keys":{"items":{"type":"string"},"type":"array","title":"Keys"},"value_type":{"$ref":"#/components/schemas/MetadataAttributeType"},"description":{"type":"string","title":"Description"},"location":{"$ref":"#/components/schemas/MetadataAttributeLocation"},"default":{"anyOf":[{},{"type":"null"}],"title":"Default"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/MetadataAttributeSelectOption"},"type":"array"},{"type":"null"}],"title":"Options"},"add_new_options":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Add New Options","default":true},"restrict_to_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/AssetType"},"type":"array"},{"type":"null"}],"title":"Restrict To Types"},"automated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Automated","default":false},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived","default":false},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Locked","default":false},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","default":false},"relation_config":{"anyOf":[{"$ref":"#/components/schemas/RelationConfig-Output"},{"type":"null"}]},"lookup_config":{"anyOf":[{"$ref":"#/components/schemas/LookupConfig"},{"type":"null"}]}},"type":"object","required":["id","name","keys","value_type","description","location"],"title":"MetadataAttribute"},"MetadataAttributeType":{"type":"string","enum":["str","single_select","multi_select","float","int","bool","datetime","rating","relation","lookup"],"title":"MetadataAttributeType","description":"The type of value a metadata attribute holds."},"MetadataAttributeLocation":{"type":"string","enum":["system","custom","asset"],"title":"MetadataAttributeLocation"},"MetadataAttributeSelectOption":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"color":{"$ref":"#/components/schemas/MetadataAttributeSelectOptionColor"},"user":{"type":"boolean","title":"User"},"archived":{"type":"boolean","title":"Archived","default":false}},"type":"object","required":["id","name","color","user"],"title":"MetadataAttributeSelectOption"},"MetadataAttributeSelectOptionColor":{"type":"string","enum":["pink","red","yellow","light_green","dark_green","light_blue","dark_blue","purple"],"title":"MetadataAttributeSelectOptionColor"},"AssetType":{"type":"string","enum":["IMAGE","VIDEO","AUDIO","DOCUMENT","HDR","HDRI","PHOTOSHOP","ILLUSTRATOR","EXR","OBJECT","VECTOR","OTHER","MAYA","MAX","BLENDER","HOUDINI","UNREAL","UNITY","AFTER_EFFECTS","MOGRT"],"title":"AssetType"},"RelationConfig-Output":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"paired_to":{"anyOf":[{"$ref":"#/components/schemas/PairedTo"},{"type":"null"}]},"inverse":{"anyOf":[{"$ref":"#/components/schemas/InverseConfig"},{"type":"null"}]}},"type":"object","required":["target"],"title":"RelationConfig"},"AssetTarget":{"properties":{"kind":{"type":"string","const":"asset","title":"Kind","default":"asset"}},"type":"object","title":"AssetTarget"},"CustomObjectTarget":{"properties":{"kind":{"type":"string","const":"custom_object","title":"Kind","default":"custom_object"},"database_id":{"type":"string","format":"uuid","title":"Database Id"}},"type":"object","required":["database_id"],"title":"CustomObjectTarget"},"IndividualTarget":{"properties":{"kind":{"type":"string","const":"individual","title":"Kind","default":"individual"}},"type":"object","title":"IndividualTarget"},"UserTarget":{"properties":{"kind":{"type":"string","const":"user","title":"Kind","default":"user"}},"type":"object","title":"UserTarget"},"PairedTo":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"column_id":{"type":"string","format":"uuid","title":"Column Id"},"type_name":{"type":"string","title":"Type Name"},"column_name":{"type":"string","title":"Column Name"}},"type":"object","required":["target","column_id","type_name","column_name"],"title":"PairedTo","description":"``target`` describes the kind that OWNS the forward column; the union\nkeeps room for non-custom-object owners (e.g. future user-source forward\ncolumns)."},"InverseConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"InverseConfig"},"LookupConfig":{"properties":{"path":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":3,"minItems":1,"title":"Path"},"path_inverse_flags":{"items":{"type":"boolean"},"type":"array","title":"Path Inverse Flags"},"target_column_id":{"type":"string","format":"uuid","title":"Target Column Id"},"target_value_type":{"type":"string","title":"Target Value Type","default":""},"aggregation":{"$ref":"#/components/schemas/LookupAggregation","default":"all"}},"type":"object","required":["path","target_column_id"],"title":"LookupConfig","description":"``path`` is the ordered list of hop ids the user clicked. Each entry\nmay be a real forward ``DatabaseColumnModel.id`` or an\n``inverse_database_columns.id`` synthetic id — the server canonicalizes\nto forward column ids at write time and persists a parallel\n``path_inverse_flags`` derived from which form each entry was. Clients\ndo not need to set ``path_inverse_flags`` on writes; any value supplied\nis ignored and overwritten by the resolver. On reads it reflects the\nstored direction array, parallel to ``path``.\n\n``target_column_id`` is the scalar attribute on the final related object.\n``target_value_type`` is ignored on the request side (the server reads it\nfrom the target column) — the default empty string just lets the request\nDTO round-trip with a placeholder. ``aggregation`` defaults to ALL when\nomitted to keep wire-compat with frontends that don't set it explicitly."},"LookupAggregation":{"type":"string","enum":["first","all","count","sum","avg","min","max"],"title":"LookupAggregation"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/metadata":{"get":{"tags":["metadata"],"summary":"Get the metadata attributes for a drive including system attributes","description":"Get the metadata attributes for a drive including system attributes","operationId":"getDriveMetadata","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MetadataAttribute-Output"}}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /workspaces/drives/{drive\_id}/metadata

> Add metadata attributes to a drive

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"metadata","description":"Metadata attributes are the fields on a drive, such as Status, Client, or\nShoot Date. Each asset holds a value for each attribute.\n\n1. List the drive's attributes, with their IDs and select options, with\n   `GET /workspaces/drives/{drive_id}/metadata`.\n2. Set one value with `PUT /assets/{asset_id}/metadata/{metadata_attribute_id}/value`,\n   or many at once with `PUT /assets/metadata/values`.\n\nThe value format depends on the attribute's `value_type`: text for `str`, an\noption ID for `single_select`, a list of option IDs for `multi_select`, an ISO\n8601 string for `datetime`, and so on. The single-value route returns `400`\nif nothing was updated. The bulk route skips updates it can't apply, so check\n`updated_metadata_attribute_ids` in its response. See the\n[Metadata guide](https://academy.shade.inc/developers/using-the-api/metadata-guide)\nfor every type."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"AddDriveMetadataRequest":{"properties":{"metadata":{"$ref":"#/components/schemas/MetadataAttribute-Input","title":"The metadata attributes","description":"The metadata attributes to add to the drive"}},"type":"object","required":["metadata"],"title":"AddDriveMetadataRequest"},"MetadataAttribute-Input":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"keys":{"items":{"type":"string"},"type":"array","title":"Keys"},"value_type":{"$ref":"#/components/schemas/MetadataAttributeType"},"description":{"type":"string","title":"Description"},"location":{"$ref":"#/components/schemas/MetadataAttributeLocation"},"default":{"anyOf":[{},{"type":"null"}],"title":"Default"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/MetadataAttributeSelectOption"},"type":"array"},{"type":"null"}],"title":"Options"},"add_new_options":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Add New Options","default":true},"restrict_to_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/AssetType"},"type":"array"},{"type":"null"}],"title":"Restrict To Types"},"automated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Automated","default":false},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived","default":false},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Locked","default":false},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","default":false},"relation_config":{"anyOf":[{"$ref":"#/components/schemas/RelationConfig-Input"},{"type":"null"}]},"lookup_config":{"anyOf":[{"$ref":"#/components/schemas/LookupConfig"},{"type":"null"}]}},"type":"object","required":["id","name","keys","value_type","description","location"],"title":"MetadataAttribute"},"MetadataAttributeType":{"type":"string","enum":["str","single_select","multi_select","float","int","bool","datetime","rating","relation","lookup"],"title":"MetadataAttributeType","description":"The type of value a metadata attribute holds."},"MetadataAttributeLocation":{"type":"string","enum":["system","custom","asset"],"title":"MetadataAttributeLocation"},"MetadataAttributeSelectOption":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"color":{"$ref":"#/components/schemas/MetadataAttributeSelectOptionColor"},"user":{"type":"boolean","title":"User"},"archived":{"type":"boolean","title":"Archived","default":false}},"type":"object","required":["id","name","color","user"],"title":"MetadataAttributeSelectOption"},"MetadataAttributeSelectOptionColor":{"type":"string","enum":["pink","red","yellow","light_green","dark_green","light_blue","dark_blue","purple"],"title":"MetadataAttributeSelectOptionColor"},"AssetType":{"type":"string","enum":["IMAGE","VIDEO","AUDIO","DOCUMENT","HDR","HDRI","PHOTOSHOP","ILLUSTRATOR","EXR","OBJECT","VECTOR","OTHER","MAYA","MAX","BLENDER","HOUDINI","UNREAL","UNITY","AFTER_EFFECTS","MOGRT"],"title":"AssetType"},"RelationConfig-Input":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"paired_to":{"anyOf":[{"$ref":"#/components/schemas/PairedTo"},{"type":"null"}]},"inverse":{"anyOf":[{"$ref":"#/components/schemas/InverseConfig"},{"type":"null"}]}},"type":"object","required":["target"],"title":"RelationConfig"},"AssetTarget":{"properties":{"kind":{"type":"string","const":"asset","title":"Kind","default":"asset"}},"type":"object","title":"AssetTarget"},"CustomObjectTarget":{"properties":{"kind":{"type":"string","const":"custom_object","title":"Kind","default":"custom_object"},"database_id":{"type":"string","format":"uuid","title":"Database Id"}},"type":"object","required":["database_id"],"title":"CustomObjectTarget"},"IndividualTarget":{"properties":{"kind":{"type":"string","const":"individual","title":"Kind","default":"individual"}},"type":"object","title":"IndividualTarget"},"UserTarget":{"properties":{"kind":{"type":"string","const":"user","title":"Kind","default":"user"}},"type":"object","title":"UserTarget"},"PairedTo":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"column_id":{"type":"string","format":"uuid","title":"Column Id"},"type_name":{"type":"string","title":"Type Name"},"column_name":{"type":"string","title":"Column Name"}},"type":"object","required":["target","column_id","type_name","column_name"],"title":"PairedTo","description":"``target`` describes the kind that OWNS the forward column; the union\nkeeps room for non-custom-object owners (e.g. future user-source forward\ncolumns)."},"InverseConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"InverseConfig"},"LookupConfig":{"properties":{"path":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":3,"minItems":1,"title":"Path"},"path_inverse_flags":{"items":{"type":"boolean"},"type":"array","title":"Path Inverse Flags"},"target_column_id":{"type":"string","format":"uuid","title":"Target Column Id"},"target_value_type":{"type":"string","title":"Target Value Type","default":""},"aggregation":{"$ref":"#/components/schemas/LookupAggregation","default":"all"}},"type":"object","required":["path","target_column_id"],"title":"LookupConfig","description":"``path`` is the ordered list of hop ids the user clicked. Each entry\nmay be a real forward ``DatabaseColumnModel.id`` or an\n``inverse_database_columns.id`` synthetic id — the server canonicalizes\nto forward column ids at write time and persists a parallel\n``path_inverse_flags`` derived from which form each entry was. Clients\ndo not need to set ``path_inverse_flags`` on writes; any value supplied\nis ignored and overwritten by the resolver. On reads it reflects the\nstored direction array, parallel to ``path``.\n\n``target_column_id`` is the scalar attribute on the final related object.\n``target_value_type`` is ignored on the request side (the server reads it\nfrom the target column) — the default empty string just lets the request\nDTO round-trip with a placeholder. ``aggregation`` defaults to ALL when\nomitted to keep wire-compat with frontends that don't set it explicitly."},"LookupAggregation":{"type":"string","enum":["first","all","count","sum","avg","min","max"],"title":"LookupAggregation"},"MetadataAttribute-Output":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"keys":{"items":{"type":"string"},"type":"array","title":"Keys"},"value_type":{"$ref":"#/components/schemas/MetadataAttributeType"},"description":{"type":"string","title":"Description"},"location":{"$ref":"#/components/schemas/MetadataAttributeLocation"},"default":{"anyOf":[{},{"type":"null"}],"title":"Default"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/MetadataAttributeSelectOption"},"type":"array"},{"type":"null"}],"title":"Options"},"add_new_options":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Add New Options","default":true},"restrict_to_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/AssetType"},"type":"array"},{"type":"null"}],"title":"Restrict To Types"},"automated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Automated","default":false},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived","default":false},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Locked","default":false},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","default":false},"relation_config":{"anyOf":[{"$ref":"#/components/schemas/RelationConfig-Output"},{"type":"null"}]},"lookup_config":{"anyOf":[{"$ref":"#/components/schemas/LookupConfig"},{"type":"null"}]}},"type":"object","required":["id","name","keys","value_type","description","location"],"title":"MetadataAttribute"},"RelationConfig-Output":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"paired_to":{"anyOf":[{"$ref":"#/components/schemas/PairedTo"},{"type":"null"}]},"inverse":{"anyOf":[{"$ref":"#/components/schemas/InverseConfig"},{"type":"null"}]}},"type":"object","required":["target"],"title":"RelationConfig"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/metadata":{"post":{"tags":["metadata"],"summary":"Add metadata attributes to a drive","operationId":"addDriveMetadata","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDriveMetadataRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataAttribute-Output"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /workspaces/drives/{drive\_id}/metadata/{metadata\_id}

> Archive metadata attribute on a drive

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"metadata","description":"Metadata attributes are the fields on a drive, such as Status, Client, or\nShoot Date. Each asset holds a value for each attribute.\n\n1. List the drive's attributes, with their IDs and select options, with\n   `GET /workspaces/drives/{drive_id}/metadata`.\n2. Set one value with `PUT /assets/{asset_id}/metadata/{metadata_attribute_id}/value`,\n   or many at once with `PUT /assets/metadata/values`.\n\nThe value format depends on the attribute's `value_type`: text for `str`, an\noption ID for `single_select`, a list of option IDs for `multi_select`, an ISO\n8601 string for `datetime`, and so on. The single-value route returns `400`\nif nothing was updated. The bulk route skips updates it can't apply, so check\n`updated_metadata_attribute_ids` in its response. See the\n[Metadata guide](https://academy.shade.inc/developers/using-the-api/metadata-guide)\nfor every type."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"ArchiveMetadataAttributeRequest":{"properties":{"archive":{"type":"boolean","title":"Archive metadata attribute or not","description":"Archive metadata attribute or not"}},"type":"object","required":["archive"],"title":"ArchiveMetadataAttributeRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/metadata/{metadata_id}":{"post":{"tags":["metadata"],"summary":"Archive metadata attribute on a drive","operationId":"archiveMetadataAttribute","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"metadata_id","in":"path","required":true,"schema":{"type":"string","title":"The metadata id"},"description":"ID of the metadata attribute. List a drive's attributes with `GET /workspaces/drives/{drive_id}/metadata`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveMetadataAttributeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"null"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## PUT /workspaces/drives/{drive\_id}/metadata/{metadata\_id}

> Update a metadata attribute on a drive

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"metadata","description":"Metadata attributes are the fields on a drive, such as Status, Client, or\nShoot Date. Each asset holds a value for each attribute.\n\n1. List the drive's attributes, with their IDs and select options, with\n   `GET /workspaces/drives/{drive_id}/metadata`.\n2. Set one value with `PUT /assets/{asset_id}/metadata/{metadata_attribute_id}/value`,\n   or many at once with `PUT /assets/metadata/values`.\n\nThe value format depends on the attribute's `value_type`: text for `str`, an\noption ID for `single_select`, a list of option IDs for `multi_select`, an ISO\n8601 string for `datetime`, and so on. The single-value route returns `400`\nif nothing was updated. The bulk route skips updates it can't apply, so check\n`updated_metadata_attribute_ids` in its response. See the\n[Metadata guide](https://academy.shade.inc/developers/using-the-api/metadata-guide)\nfor every type."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"LegacyUpdateMetadataBody":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"automated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Automated"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"default":{"anyOf":[{"$ref":"#/components/schemas/JsonValue-Input"},{"type":"null"}]},"add_new_options":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Add New Options"},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/MetadataAttributeSelectOption"},"type":"array"},{"type":"null"}],"title":"Options"},"rerun":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Rerun","default":false},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Locked"}},"type":"object","title":"LegacyUpdateMetadataBody","description":"Legacy update shape. Top-level fields match the original ``embed=True``\nBody() params so the wire format is unchanged. ``model_fields_set`` lets\nthe patch builder distinguish \"field absent\" from \"explicit null\"."},"JsonValue-Input":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"object"},{"type":"null"}]},"MetadataAttributeSelectOption":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"color":{"$ref":"#/components/schemas/MetadataAttributeSelectOptionColor"},"user":{"type":"boolean","title":"User"},"archived":{"type":"boolean","title":"Archived","default":false}},"type":"object","required":["id","name","color","user"],"title":"MetadataAttributeSelectOption"},"MetadataAttributeSelectOptionColor":{"type":"string","enum":["pink","red","yellow","light_green","dark_green","light_blue","dark_blue","purple"],"title":"MetadataAttributeSelectOptionColor"},"MetadataAttribute-Output":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"keys":{"items":{"type":"string"},"type":"array","title":"Keys"},"value_type":{"$ref":"#/components/schemas/MetadataAttributeType"},"description":{"type":"string","title":"Description"},"location":{"$ref":"#/components/schemas/MetadataAttributeLocation"},"default":{"anyOf":[{},{"type":"null"}],"title":"Default"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/MetadataAttributeSelectOption"},"type":"array"},{"type":"null"}],"title":"Options"},"add_new_options":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Add New Options","default":true},"restrict_to_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/AssetType"},"type":"array"},{"type":"null"}],"title":"Restrict To Types"},"automated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Automated","default":false},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archived","default":false},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Locked","default":false},"deleted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Deleted","default":false},"relation_config":{"anyOf":[{"$ref":"#/components/schemas/RelationConfig-Output"},{"type":"null"}]},"lookup_config":{"anyOf":[{"$ref":"#/components/schemas/LookupConfig"},{"type":"null"}]}},"type":"object","required":["id","name","keys","value_type","description","location"],"title":"MetadataAttribute"},"MetadataAttributeType":{"type":"string","enum":["str","single_select","multi_select","float","int","bool","datetime","rating","relation","lookup"],"title":"MetadataAttributeType","description":"The type of value a metadata attribute holds."},"MetadataAttributeLocation":{"type":"string","enum":["system","custom","asset"],"title":"MetadataAttributeLocation"},"AssetType":{"type":"string","enum":["IMAGE","VIDEO","AUDIO","DOCUMENT","HDR","HDRI","PHOTOSHOP","ILLUSTRATOR","EXR","OBJECT","VECTOR","OTHER","MAYA","MAX","BLENDER","HOUDINI","UNREAL","UNITY","AFTER_EFFECTS","MOGRT"],"title":"AssetType"},"RelationConfig-Output":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"paired_to":{"anyOf":[{"$ref":"#/components/schemas/PairedTo"},{"type":"null"}]},"inverse":{"anyOf":[{"$ref":"#/components/schemas/InverseConfig"},{"type":"null"}]}},"type":"object","required":["target"],"title":"RelationConfig"},"AssetTarget":{"properties":{"kind":{"type":"string","const":"asset","title":"Kind","default":"asset"}},"type":"object","title":"AssetTarget"},"CustomObjectTarget":{"properties":{"kind":{"type":"string","const":"custom_object","title":"Kind","default":"custom_object"},"database_id":{"type":"string","format":"uuid","title":"Database Id"}},"type":"object","required":["database_id"],"title":"CustomObjectTarget"},"IndividualTarget":{"properties":{"kind":{"type":"string","const":"individual","title":"Kind","default":"individual"}},"type":"object","title":"IndividualTarget"},"UserTarget":{"properties":{"kind":{"type":"string","const":"user","title":"Kind","default":"user"}},"type":"object","title":"UserTarget"},"PairedTo":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"column_id":{"type":"string","format":"uuid","title":"Column Id"},"type_name":{"type":"string","title":"Type Name"},"column_name":{"type":"string","title":"Column Name"}},"type":"object","required":["target","column_id","type_name","column_name"],"title":"PairedTo","description":"``target`` describes the kind that OWNS the forward column; the union\nkeeps room for non-custom-object owners (e.g. future user-source forward\ncolumns)."},"InverseConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"InverseConfig"},"LookupConfig":{"properties":{"path":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":3,"minItems":1,"title":"Path"},"path_inverse_flags":{"items":{"type":"boolean"},"type":"array","title":"Path Inverse Flags"},"target_column_id":{"type":"string","format":"uuid","title":"Target Column Id"},"target_value_type":{"type":"string","title":"Target Value Type","default":""},"aggregation":{"$ref":"#/components/schemas/LookupAggregation","default":"all"}},"type":"object","required":["path","target_column_id"],"title":"LookupConfig","description":"``path`` is the ordered list of hop ids the user clicked. Each entry\nmay be a real forward ``DatabaseColumnModel.id`` or an\n``inverse_database_columns.id`` synthetic id — the server canonicalizes\nto forward column ids at write time and persists a parallel\n``path_inverse_flags`` derived from which form each entry was. Clients\ndo not need to set ``path_inverse_flags`` on writes; any value supplied\nis ignored and overwritten by the resolver. On reads it reflects the\nstored direction array, parallel to ``path``.\n\n``target_column_id`` is the scalar attribute on the final related object.\n``target_value_type`` is ignored on the request side (the server reads it\nfrom the target column) — the default empty string just lets the request\nDTO round-trip with a placeholder. ``aggregation`` defaults to ALL when\nomitted to keep wire-compat with frontends that don't set it explicitly."},"LookupAggregation":{"type":"string","enum":["first","all","count","sum","avg","min","max"],"title":"LookupAggregation"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/metadata/{metadata_id}":{"put":{"tags":["metadata"],"summary":"Update a metadata attribute on a drive","operationId":"updateMetadataAttribute","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"metadata_id","in":"path","required":true,"schema":{"type":"string","title":"The metadata id"},"description":"ID of the metadata attribute. List a drive's attributes with `GET /workspaces/drives/{drive_id}/metadata`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyUpdateMetadataBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataAttribute-Output"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## DELETE /workspaces/drives/{drive\_id}/metadata/{metadata\_id}

> Delete a metadata attribute on a drive

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"metadata","description":"Metadata attributes are the fields on a drive, such as Status, Client, or\nShoot Date. Each asset holds a value for each attribute.\n\n1. List the drive's attributes, with their IDs and select options, with\n   `GET /workspaces/drives/{drive_id}/metadata`.\n2. Set one value with `PUT /assets/{asset_id}/metadata/{metadata_attribute_id}/value`,\n   or many at once with `PUT /assets/metadata/values`.\n\nThe value format depends on the attribute's `value_type`: text for `str`, an\noption ID for `single_select`, a list of option IDs for `multi_select`, an ISO\n8601 string for `datetime`, and so on. The single-value route returns `400`\nif nothing was updated. The bulk route skips updates it can't apply, so check\n`updated_metadata_attribute_ids` in its response. See the\n[Metadata guide](https://academy.shade.inc/developers/using-the-api/metadata-guide)\nfor every type."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/metadata/{metadata_id}":{"delete":{"tags":["metadata"],"summary":"Delete a metadata attribute on a drive","operationId":"deleteMetadataAttribute","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"metadata_id","in":"path","required":true,"schema":{"type":"string","title":"The metadata id"},"description":"ID of the metadata attribute. List a drive's attributes with `GET /workspaces/drives/{drive_id}/metadata`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"null"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /workspaces/drives/{drive\_id}/metadata/{metadata\_id}/option

> Create a metadata attribute option on a drive

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"metadata","description":"Metadata attributes are the fields on a drive, such as Status, Client, or\nShoot Date. Each asset holds a value for each attribute.\n\n1. List the drive's attributes, with their IDs and select options, with\n   `GET /workspaces/drives/{drive_id}/metadata`.\n2. Set one value with `PUT /assets/{asset_id}/metadata/{metadata_attribute_id}/value`,\n   or many at once with `PUT /assets/metadata/values`.\n\nThe value format depends on the attribute's `value_type`: text for `str`, an\noption ID for `single_select`, a list of option IDs for `multi_select`, an ISO\n8601 string for `datetime`, and so on. The single-value route returns `400`\nif nothing was updated. The bulk route skips updates it can't apply, so check\n`updated_metadata_attribute_ids` in its response. See the\n[Metadata guide](https://academy.shade.inc/developers/using-the-api/metadata-guide)\nfor every type."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"CreateMetadataAttributeOptionRequest":{"properties":{"option_name":{"type":"string","title":"The option name","description":"The option name to add to the metadata attribute"},"option_color":{"$ref":"#/components/schemas/MetadataAttributeSelectOptionColor","title":"The option color","description":"The option color to add to the metadata attribute"}},"type":"object","required":["option_name","option_color"],"title":"CreateMetadataAttributeOptionRequest"},"MetadataAttributeSelectOptionColor":{"type":"string","enum":["pink","red","yellow","light_green","dark_green","light_blue","dark_blue","purple"],"title":"MetadataAttributeSelectOptionColor"},"MetadataAttributeSelectOption":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"color":{"$ref":"#/components/schemas/MetadataAttributeSelectOptionColor"},"user":{"type":"boolean","title":"User"},"archived":{"type":"boolean","title":"Archived","default":false}},"type":"object","required":["id","name","color","user"],"title":"MetadataAttributeSelectOption"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/metadata/{metadata_id}/option":{"post":{"tags":["metadata"],"summary":"Create a metadata attribute option on a drive","operationId":"createMetadataAttributeOption","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"metadata_id","in":"path","required":true,"schema":{"type":"string","title":"The metadata id"},"description":"ID of the metadata attribute. List a drive's attributes with `GET /workspaces/drives/{drive_id}/metadata`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMetadataAttributeOptionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataAttributeSelectOption"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /workspaces/drives/{drive\_id}/relation-targets

> Search for objects to relate to

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"metadata","description":"Metadata attributes are the fields on a drive, such as Status, Client, or\nShoot Date. Each asset holds a value for each attribute.\n\n1. List the drive's attributes, with their IDs and select options, with\n   `GET /workspaces/drives/{drive_id}/metadata`.\n2. Set one value with `PUT /assets/{asset_id}/metadata/{metadata_attribute_id}/value`,\n   or many at once with `PUT /assets/metadata/values`.\n\nThe value format depends on the attribute's `value_type`: text for `str`, an\noption ID for `single_select`, a list of option IDs for `multi_select`, an ISO\n8601 string for `datetime`, and so on. The single-value route returns `400`\nif nothing was updated. The bulk route skips updates it can't apply, so check\n`updated_metadata_attribute_ids` in its response. See the\n[Metadata guide](https://academy.shade.inc/developers/using-the-api/metadata-guide)\nfor every type."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"RelatedObjectType":{"type":"string","enum":["asset","custom_object","user","individual"],"title":"RelatedObjectType"},"RelationPillDTO":{"oneOf":[{"$ref":"#/components/schemas/AssetPillDTO"},{"$ref":"#/components/schemas/CustomObjectPillDTO"},{"$ref":"#/components/schemas/IndividualPillDTO"},{"$ref":"#/components/schemas/UserPillDTO"}],"discriminator":{"propertyName":"entity_type","mapping":{"asset":"#/components/schemas/AssetPillDTO","custom_object":"#/components/schemas/CustomObjectPillDTO","individual":"#/components/schemas/IndividualPillDTO","user":"#/components/schemas/UserPillDTO"}}},"AssetPillDTO":{"properties":{"entity_type":{"type":"string","const":"asset","title":"Entity Type","default":"asset"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"asset_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"}},"type":"object","required":["entity_type","id","name","asset_type","thumbnail_url"],"title":"AssetPillDTO"},"CustomObjectPillDTO":{"properties":{"entity_type":{"type":"string","const":"custom_object","title":"Entity Type","default":"custom_object"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"}},"type":"object","required":["entity_type","id","name","icon","color"],"title":"CustomObjectPillDTO"},"IndividualPillDTO":{"properties":{"entity_type":{"type":"string","const":"individual","title":"Entity Type","default":"individual"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["entity_type","id","name","avatar_url"],"title":"IndividualPillDTO"},"UserPillDTO":{"properties":{"entity_type":{"type":"string","const":"user","title":"Entity Type","default":"user"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"email":{"type":"string","title":"Email"}},"type":"object","required":["entity_type","id","name","avatar_url","email"],"title":"UserPillDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/relation-targets":{"get":{"tags":["metadata"],"summary":"Search for objects to relate to","operationId":"searchRelationTargets","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"object_type","in":"query","required":true,"schema":{"$ref":"#/components/schemas/RelatedObjectType","title":"Type of object to search"}},{"name":"query","in":"query","required":false,"schema":{"type":"string","title":"Search query","default":""}},{"name":"target_database_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Database ID for custom object searches"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RelationPillDTO"}}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://academy.shade.inc/developers/organize/metadata.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
