Skip to content

Commit

Permalink
[TSI-2174] Add custom_metadata_filters param to locale download endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jablan committed Dec 5, 2023
1 parent e03aa9f commit f536479
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
13 changes: 12 additions & 1 deletion doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -7778,6 +7778,17 @@
"schema": {
"type": "string"
}
},
{
"name": "custom_metadata_filters",
"in": "query",
"description": "Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download.\n",
"schema": {
"type": "object",
"properties": {}
},
"style": "deepObject",
"explode": true
}
],
"responses": {
Expand Down Expand Up @@ -7816,7 +7827,7 @@
"x-code-samples": [
{
"lang": "Curl",
"source": "curl \"https://api.phrase.com/v2/projects/:project_id/locales/:id/download?branch=my-feature-branch&file_format=yml&tags=feature1,feature2&tag=feature\" \\\n -u USERNAME_OR_ACCESS_TOKEN"
"source": "curl \"https://api.phrase.com/v2/projects/:project_id/locales/:id/download?branch=my-feature-branch&file_format=yml&tags=feature1,feature2&tag=feature&custom_metadata_filters[tone]=friendly\" \\\n -u USERNAME_OR_ACCESS_TOKEN"
},
{
"lang": "CLI v2",
Expand Down
11 changes: 10 additions & 1 deletion paths/locales/download.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ parameters:
in: query
schema:
type: string
- name: custom_metadata_filters
in: query
description: |
Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download.
schema:
type: object
properties: {}
style: deepObject
explode: true
responses:
"200":
description: OK
Expand All @@ -136,7 +145,7 @@ responses:
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/locales/:id/download?branch=my-feature-branch&file_format=yml&tags=feature1,feature2&tag=feature" \
curl "https://api.phrase.com/v2/projects/:project_id/locales/:id/download?branch=my-feature-branch&file_format=yml&tags=feature1,feature2&tag=feature&custom_metadata_filters[tone]=friendly" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
Expand Down

0 comments on commit f536479

Please sign in to comment.