Create a new label
POST {{api-server}}/{{Filerobot-Token}}/v5/labels
This API endpoint creates a new label in the project's structure.
Body parameters:
Name: | Description: | Syntax: | Value/Example: |
---|---|---|---|
name | Name of the new label | "name": "Fashion" | |
color | Color of the new label | The value is in Hex color code. | "color": "#9580E9" |
shape | Shape of the new label | Optional parameter | "shape": "pin" |
is_pinned | Specifies if the label should appear at the top of the list | Default value is false | "is_pinned": false |
permissions | Defines who has rights to see and use this label vewing defines who is able to see this Label attaching defines who is eligible to attach the label to assets | "scope": "SK_ORG" - gives access to all Users in the projects ids - specific user_ids can be defined to have access to this label | "permissions": { "viewing": { "scope": "SK_ORG", "ids": null }, "attaching": { "scope": "SK_ORG", "ids": null } } |
Request Body
{"label"=>{"name"=>"Fashion", "color"=>"#9580E9", "shape"=>"pin", "is_pinned"=>false, "permissions"=>{"viewing"=>{"scope"=>"SK_ORG", "ids"=>nil}, "attaching"=>{"scope"=>"SK_ORG", "ids"=>nil}}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
X-Filerobot-Key | string |
RESPONSES
status: OK
{"status":"success","duration":0.4325568675994873,"api_version":{"hash":"b0d23b8fa1ae371a4966d57ae5237d65ced42d32","datetime":"2024-06-19T11:07:33+07:00","module":"elastic_v2"},"label":{"uuid":"791c5d9d-0ed8-4f2b-97c1-a768d79bf8eb","sid":"#lbjh69fya","name":"Fashion","created_at":"2024-06-19T16:25:16Z","updated_at":"2024-06-19T16:25:16Z"}}