|
733 | 733 | "$ref": "#/components/schemas/project_short"
|
734 | 734 | }
|
735 | 735 | },
|
| 736 | + "value_options": { |
| 737 | + "type": "array", |
| 738 | + "items": { |
| 739 | + "type": "string" |
| 740 | + } |
| 741 | + }, |
736 | 742 | "created_at": {
|
737 | 743 | "type": "string",
|
738 | 744 | "format": "date-time"
|
|
744 | 750 | },
|
745 | 751 | "example": {
|
746 | 752 | "id": "abcd1234cdef1234abcd1234cdef1234",
|
747 |
| - "name": "Character Age", |
748 |
| - "description": "Age of character in seconds", |
749 |
| - "data_type": "Text value", |
| 753 | + "name": "Nuts", |
| 754 | + "description": "A healthy snack for all ages", |
| 755 | + "data_type": "multi_select", |
750 | 756 | "user": {
|
751 | 757 | "id": "abcd1234cdef1234abcd1234cdef1234",
|
752 | 758 | "username": "joe.doe",
|
|
762 | 768 | "created_at": "2015-01-28T09:52:53Z",
|
763 | 769 | "updated_at": "2015-01-28T09:52:53Z"
|
764 | 770 | }
|
| 771 | + ], |
| 772 | + "value_options": [ |
| 773 | + "apple", |
| 774 | + "banana", |
| 775 | + "coconut" |
765 | 776 | ]
|
766 | 777 | }
|
767 | 778 | },
|
|
6228 | 6239 | }
|
6229 | 6240 | ],
|
6230 | 6241 | "x-cli-version": "2.9"
|
| 6242 | + }, |
| 6243 | + "post": { |
| 6244 | + "summary": "Create a property", |
| 6245 | + "description": "Create a new custom metadata property.", |
| 6246 | + "operationId": "custom_metadata_property/create", |
| 6247 | + "tags": [ |
| 6248 | + "Custom Metadata" |
| 6249 | + ], |
| 6250 | + "parameters": [ |
| 6251 | + { |
| 6252 | + "$ref": "#/components/parameters/X-PhraseApp-OTP" |
| 6253 | + }, |
| 6254 | + { |
| 6255 | + "$ref": "#/components/parameters/account_id" |
| 6256 | + }, |
| 6257 | + { |
| 6258 | + "$ref": "#/components/parameters/id" |
| 6259 | + }, |
| 6260 | + { |
| 6261 | + "description": "name of the property", |
| 6262 | + "example": [ |
| 6263 | + "Fruit" |
| 6264 | + ], |
| 6265 | + "name": "name", |
| 6266 | + "in": "query", |
| 6267 | + "schema": { |
| 6268 | + "type": "string" |
| 6269 | + } |
| 6270 | + }, |
| 6271 | + { |
| 6272 | + "$ref": "#/components/parameters/data_type" |
| 6273 | + }, |
| 6274 | + { |
| 6275 | + "description": "description of property", |
| 6276 | + "example": [ |
| 6277 | + "A healthy snack for all ages" |
| 6278 | + ], |
| 6279 | + "name": "description", |
| 6280 | + "in": "query", |
| 6281 | + "schema": { |
| 6282 | + "type": "string" |
| 6283 | + } |
| 6284 | + }, |
| 6285 | + { |
| 6286 | + "description": "ids of projects that the property belongs to", |
| 6287 | + "example": [ |
| 6288 | + "abcd1234cdef1234abcd1234cdef1234" |
| 6289 | + ], |
| 6290 | + "name": "project_ids", |
| 6291 | + "in": "query", |
| 6292 | + "schema": { |
| 6293 | + "type": "array", |
| 6294 | + "items": { |
| 6295 | + "type": "string" |
| 6296 | + } |
| 6297 | + } |
| 6298 | + }, |
| 6299 | + { |
| 6300 | + "description": "value options of property (only applies to single or multi select properties)", |
| 6301 | + "example": [ |
| 6302 | + "Apple", |
| 6303 | + "Banana", |
| 6304 | + "Coconut" |
| 6305 | + ], |
| 6306 | + "name": "value_options", |
| 6307 | + "in": "query", |
| 6308 | + "schema": { |
| 6309 | + "type": "array", |
| 6310 | + "items": { |
| 6311 | + "type": "string" |
| 6312 | + } |
| 6313 | + } |
| 6314 | + } |
| 6315 | + ], |
| 6316 | + "responses": { |
| 6317 | + "200": { |
| 6318 | + "description": "OK", |
| 6319 | + "content": { |
| 6320 | + "application/json": { |
| 6321 | + "schema": { |
| 6322 | + "$ref": "#/components/schemas/custom_metadata_property" |
| 6323 | + } |
| 6324 | + } |
| 6325 | + }, |
| 6326 | + "headers": { |
| 6327 | + "X-Rate-Limit-Limit": { |
| 6328 | + "$ref": "#/components/headers/X-Rate-Limit-Limit" |
| 6329 | + }, |
| 6330 | + "X-Rate-Limit-Remaining": { |
| 6331 | + "$ref": "#/components/headers/X-Rate-Limit-Remaining" |
| 6332 | + }, |
| 6333 | + "X-Rate-Limit-Reset": { |
| 6334 | + "$ref": "#/components/headers/X-Rate-Limit-Reset" |
| 6335 | + } |
| 6336 | + } |
| 6337 | + }, |
| 6338 | + "400": { |
| 6339 | + "$ref": "#/components/responses/400" |
| 6340 | + }, |
| 6341 | + "404": { |
| 6342 | + "$ref": "#/components/responses/404" |
| 6343 | + }, |
| 6344 | + "422": { |
| 6345 | + "$ref": "#/components/responses/422" |
| 6346 | + }, |
| 6347 | + "429": { |
| 6348 | + "$ref": "#/components/responses/429" |
| 6349 | + } |
| 6350 | + }, |
| 6351 | + "x-code-samples": [ |
| 6352 | + { |
| 6353 | + "lang": "Curl", |
| 6354 | + "source": "curl \"https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"name\":\"Fruit\",\"description\":\"A healthy snack for all ages\",\"project_ids\":[\"1\",\"2\",\"3\"],\"value_options\":[\"apple\",\"banana\",\"coconut\"]}' \\\n -H 'Content-Type: application/json'" |
| 6355 | + }, |
| 6356 | + { |
| 6357 | + "lang": "CLI v2", |
| 6358 | + "source": "phrase custom_metadata_properties create \\\n--account_id <account_id> \\\n--id <id> \\\n--data '{\"name\":\"Fruit\",\"description\":\"A healthy snack for all ages\",\"project_ids\":[\"1\",\"2\",\"3\"],\"value_options\":[\"apple\",\"banana\",\"coconut\"]}' \\\n--access_token <token>" |
| 6359 | + } |
| 6360 | + ], |
| 6361 | + "x-cli-version": "2.9" |
| 6362 | + }, |
| 6363 | + "patch": { |
| 6364 | + "summary": "Update a property", |
| 6365 | + "description": "Update an existing custom metadata property.", |
| 6366 | + "operationId": "custom_metadata_property/update", |
| 6367 | + "tags": [ |
| 6368 | + "Custom Metadata" |
| 6369 | + ], |
| 6370 | + "parameters": [ |
| 6371 | + { |
| 6372 | + "$ref": "#/components/parameters/X-PhraseApp-OTP" |
| 6373 | + }, |
| 6374 | + { |
| 6375 | + "$ref": "#/components/parameters/account_id" |
| 6376 | + }, |
| 6377 | + { |
| 6378 | + "$ref": "#/components/parameters/id" |
| 6379 | + }, |
| 6380 | + { |
| 6381 | + "description": "name of the property", |
| 6382 | + "example": [ |
| 6383 | + "Fruit" |
| 6384 | + ], |
| 6385 | + "name": "name", |
| 6386 | + "in": "query", |
| 6387 | + "schema": { |
| 6388 | + "type": "string" |
| 6389 | + } |
| 6390 | + }, |
| 6391 | + { |
| 6392 | + "description": "description of property", |
| 6393 | + "example": [ |
| 6394 | + "A healthy snack for all ages" |
| 6395 | + ], |
| 6396 | + "name": "description", |
| 6397 | + "in": "query", |
| 6398 | + "schema": { |
| 6399 | + "type": "string" |
| 6400 | + } |
| 6401 | + }, |
| 6402 | + { |
| 6403 | + "description": "ids of projects that the property belongs to", |
| 6404 | + "example": [ |
| 6405 | + "abcd1234cdef1234abcd1234cdef1234" |
| 6406 | + ], |
| 6407 | + "name": "project_ids", |
| 6408 | + "in": "query", |
| 6409 | + "schema": { |
| 6410 | + "type": "array", |
| 6411 | + "items": { |
| 6412 | + "type": "string" |
| 6413 | + } |
| 6414 | + } |
| 6415 | + }, |
| 6416 | + { |
| 6417 | + "description": "value options of property (only applies to single or multi select properties)", |
| 6418 | + "example": [ |
| 6419 | + "Apple", |
| 6420 | + "Banana", |
| 6421 | + "Coconut" |
| 6422 | + ], |
| 6423 | + "name": "value_options", |
| 6424 | + "in": "query", |
| 6425 | + "schema": { |
| 6426 | + "type": "array", |
| 6427 | + "items": { |
| 6428 | + "type": "string" |
| 6429 | + } |
| 6430 | + } |
| 6431 | + } |
| 6432 | + ], |
| 6433 | + "responses": { |
| 6434 | + "200": { |
| 6435 | + "description": "OK", |
| 6436 | + "content": { |
| 6437 | + "application/json": { |
| 6438 | + "schema": { |
| 6439 | + "$ref": "#/components/schemas/custom_metadata_property" |
| 6440 | + } |
| 6441 | + } |
| 6442 | + }, |
| 6443 | + "headers": { |
| 6444 | + "X-Rate-Limit-Limit": { |
| 6445 | + "$ref": "#/components/headers/X-Rate-Limit-Limit" |
| 6446 | + }, |
| 6447 | + "X-Rate-Limit-Remaining": { |
| 6448 | + "$ref": "#/components/headers/X-Rate-Limit-Remaining" |
| 6449 | + }, |
| 6450 | + "X-Rate-Limit-Reset": { |
| 6451 | + "$ref": "#/components/headers/X-Rate-Limit-Reset" |
| 6452 | + } |
| 6453 | + } |
| 6454 | + }, |
| 6455 | + "400": { |
| 6456 | + "$ref": "#/components/responses/400" |
| 6457 | + }, |
| 6458 | + "404": { |
| 6459 | + "$ref": "#/components/responses/404" |
| 6460 | + }, |
| 6461 | + "429": { |
| 6462 | + "$ref": "#/components/responses/429" |
| 6463 | + } |
| 6464 | + }, |
| 6465 | + "x-code-samples": [ |
| 6466 | + { |
| 6467 | + "lang": "Curl", |
| 6468 | + "source": "curl \"https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X PATCH \\\n -d '{\"name\":\"Fruit\",\"description\":\"A healthy snack for all ages\",\"project_ids\":[\"1\",\"2\",\"3\"],\"value_options\":[\"apple\",\"banana\",\"coconut\"]}' \\\n -H 'Content-Type: application/json'" |
| 6469 | + }, |
| 6470 | + { |
| 6471 | + "lang": "CLI v2", |
| 6472 | + "source": "phrase custom_metadata_properties update \\\n--account_id <account_id> \\\n--id <id> \\\n--data '{\"name\":\"Fruit\",\"description\":\"A healthy snack for all ages\",\"project_ids\":[\"1\",\"2\",\"3\"],\"value_options\":[\"apple\",\"banana\",\"coconut\"]}' \\\n--access_token <token>" |
| 6473 | + } |
| 6474 | + ], |
| 6475 | + "x-cli-version": "2.9" |
6231 | 6476 | }
|
6232 | 6477 | },
|
6233 | 6478 | "/accounts/{account_id}/invitations": {
|
|
0 commit comments