Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(API): Add custom_metadata_filters param to locale download endpoint [TSI-2174] #478

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Changes from 1 commit
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
Next Next commit
[TSI-2174] Add custom_metadata_filters param to locale download endpoint
jablan committed Dec 5, 2023
commit f5364799778b449c5af9ff6e51f7a2c1aa421bd6
13 changes: 12 additions & 1 deletion doc/compiled.json
Original file line number Diff line number Diff line change
@@ -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": {
@@ -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",
11 changes: 10 additions & 1 deletion paths/locales/download.yaml
Original file line number Diff line number Diff line change
@@ -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
@@ -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: |-