Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -5926,7 +5926,7 @@
"/projects/{project_id}/documents/{id}": {
"delete": {
"summary": "Delete document",
"description": "Delete an existing document.",
"description": "Permanently deletes a document and all of its associated translation segments from the project. Use this when you want to remove a document that is no longer needed; the deletion cannot be reversed and all associated segments will be lost.\n",
"operationId": "document/delete",
"tags": [
"Documents"
Expand All @@ -5953,8 +5953,7 @@
"$ref": "#/components/responses/401"
},
"403": {
"$ref": "#/components/responses/403",
"description": "Forbidden. Returned when the access token lacks the `write` scope or when the requesting user is not allowed to delete this document."
"$ref": "#/components/responses/403"
},
"404": {
"$ref": "#/components/responses/404"
Expand All @@ -5967,10 +5966,6 @@
}
},
"x-code-samples": [
{
"lang": "Curl",
"source": "curl \"https://api.phrase.com/v2/projects/:project_id/documents/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X DELETE \\\n -H 'Content-Type: application/json'"
},
{
"lang": "CLI v2",
"source": "phrase documents delete \\\n--project_id <project_id> \\\n--id <id> \\\n--access_token <token>"
Expand Down
14 changes: 4 additions & 10 deletions paths/documents/destroy.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
summary: Delete document
description: Delete an existing document.
description: |
Permanently deletes a document and all of its associated translation segments from the project. Use this when you want to remove a document that is no longer needed; the deletion cannot be reversed and all associated segments will be lost.
operationId: document/delete
tags:
- Documents
Expand All @@ -13,24 +14,17 @@ responses:
"$ref": "../../responses.yaml#/200"
'400':
"$ref": "../../responses.yaml#/400"
'404':
"$ref": "../../responses.yaml#/404"
'401':
"$ref": "../../responses.yaml#/401"
'403':
"$ref": "../../responses.yaml#/403"
description: Forbidden. Returned when the access token lacks the `write` scope or when the requesting user is not allowed to delete this document.
'404':
"$ref": "../../responses.yaml#/404"
'422':
"$ref": "../../responses.yaml#/422"
'429':
"$ref": "../../responses.yaml#/429"
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/documents/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X DELETE \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase documents delete \
Expand Down
Loading