github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/paths/glossaries/create.yaml (about) 1 --- 2 summary: Create a term base 3 description: 'Create a new term base (previously: glossary).' 4 operationId: glossary/create 5 tags: 6 - Glossaries 7 parameters: 8 - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" 9 - "$ref": "../../parameters.yaml#/account_id" 10 responses: 11 '201': 12 description: Created 13 content: 14 application/json: 15 schema: 16 "$ref": "../../schemas/glossary.yaml#/glossary" 17 headers: 18 X-Rate-Limit-Limit: 19 "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" 20 X-Rate-Limit-Remaining: 21 "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" 22 X-Rate-Limit-Reset: 23 "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" 24 '400': 25 "$ref": "../../responses.yaml#/400" 26 '404': 27 "$ref": "../../responses.yaml#/404" 28 '429': 29 "$ref": "../../responses.yaml#/429" 30 x-code-samples: 31 - lang: Curl 32 source: |- 33 curl "https://api.phrase.com/v2/accounts/:account_id/glossaries" \ 34 -u USERNAME_OR_ACCESS_TOKEN \ 35 -X POST \ 36 -d '{"name":"My term base","project_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235","space_ids":["abcd1234abcd1234abcd1234","abcd1234abcd1234abcd1235"]}' \ 37 -H 'Content-Type: application/json' 38 - lang: CLI v2 39 source: |- 40 phrase glossaries create \ 41 --account_id <account_id> \ 42 --data '{"name":"My term base", "project_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235", "space_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235"}' \ 43 --access_token <token> 44 requestBody: 45 required: true 46 content: 47 application/json: 48 schema: 49 type: object 50 title: glossary/create/parameters 51 required: 52 - name 53 properties: 54 name: 55 description: Name of the glossary 56 type: string 57 example: My glossary 58 project_ids: 59 description: List of project ids the glossary should be assigned to. 60 type: string 61 example: abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235 62 space_ids: 63 description: List of space ids the glossary should be assigned to. 64 type: array 65 items: 66 type: string 67 example: 68 - abcd1234abcd1234abcd1234 69 - abcd1234abcd1234abcd1235 70 x-cli-version: '2.5'