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
132 changes: 132 additions & 0 deletions doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -21948,6 +21948,138 @@
"x-cli-version": "2.5"
}
},
"/projects/{project_id}/members": {
"get": {
"summary": "List project members",
"description": "Get all members active in the project. Access token scope must include `read`.",
"operationId": "members/by_project",
"tags": [
"Members"
],
"parameters": [
{
"$ref": "#/components/parameters/X-PhraseApp-OTP"
},
{
"$ref": "#/components/parameters/project_id"
},
{
"description": "Specify a query to search for members by name or email (including wildcards).",
"example": "jane*",
"name": "q",
"in": "query",
"schema": {
"type": "string"
}
},
{
"description": "Filter members to those assigned to the job identified by this id.",
"example": "abcd1234cdef1234abcd1234cdef1234",
"name": "job_id",
"in": "query",
"schema": {
"type": "string"
}
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/per_page"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"title": "project_member",
"properties": {
"id": {
"type": "string"
},
"username": {
"type": "string"
},
"name": {
"type": "string"
},
"position": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"example": {
"id": "acbdacbdacbdacbdacbdacbd",
"username": "myname",
"name": "My Name",
"position": "Lead Developer",
"created_at": "2020-12-07T12:56:21Z",
"updated_at": "2020-12-09T12:56:21Z"
}
}
}
}
},
"headers": {
"X-Rate-Limit-Limit": {
"$ref": "#/components/headers/X-Rate-Limit-Limit"
},
"X-Rate-Limit-Remaining": {
"$ref": "#/components/headers/X-Rate-Limit-Remaining"
},
"X-Rate-Limit-Reset": {
"$ref": "#/components/headers/X-Rate-Limit-Reset"
},
"Link": {
"$ref": "#/components/headers/Link"
},
"Pagination": {
"$ref": "#/components/headers/Pagination"
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"401": {
"$ref": "#/components/responses/401"
},
"403": {
"$ref": "#/components/responses/403",
"description": "Forbidden. Returned when the access token lacks the `read` scope or when the requesting user is not allowed to list members in this project."
},
"404": {
"$ref": "#/components/responses/404"
},
"429": {
"$ref": "#/components/responses/429"
}
},
"x-code-samples": [
{
"lang": "Curl",
"source": "curl \"https://api.phrase.com/v2/projects/:project_id/members\" \\\n -u USERNAME_OR_ACCESS_TOKEN"
},
{
"lang": "CLI v2",
"source": "phrase members by_project \\\n--project_id <project_id> \\\n--access_token <token>"
}
],
"x-cli-version": "2.5"
}
},
"/projects/{project_id}/members/{id}": {
"patch": {
"summary": "Update a member's project settings",
Expand Down
3 changes: 3 additions & 0 deletions paths.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,9 @@
"$ref": "./paths/members/update.yaml"
delete:
"$ref": "./paths/members/destroy.yaml"
"/projects/{project_id}/members":
get:
"$ref": "./paths/members/index_project.yaml"
"/projects/{project_id}/members/{id}":
patch:
"$ref": "./paths/members/update_settings.yaml"
Expand Down
67 changes: 67 additions & 0 deletions paths/members/index_project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
summary: List project members
description: |-
Get all members active in the project. Access token scope must include `read`.
operationId: members/by_project
tags:
- Members
parameters:
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
- "$ref": "../../parameters.yaml#/project_id"
- description: |-
Specify a query to search for members by name or email (including wildcards).
example: jane*
name: q
in: query
schema:
type: string
- description: Filter members to those assigned to the job identified by this id.
example: abcd1234cdef1234abcd1234cdef1234
name: job_id
in: query
schema:
type: string
- "$ref": "../../parameters.yaml#/page"
- "$ref": "../../parameters.yaml#/per_page"
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
"$ref": "../../schemas/project_member.yaml#/project_member"
headers:
X-Rate-Limit-Limit:
"$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
X-Rate-Limit-Remaining:
"$ref": "../../headers.yaml#/X-Rate-Limit-Remaining"
X-Rate-Limit-Reset:
"$ref": "../../headers.yaml#/X-Rate-Limit-Reset"
Link:
"$ref": "../../headers.yaml#/Link"
Pagination:
"$ref": "../../headers.yaml#/Pagination"
'400':
"$ref": "../../responses.yaml#/400"
'401':
"$ref": "../../responses.yaml#/401"
'403':
"$ref": "../../responses.yaml#/403"
description: Forbidden. Returned when the access token lacks the `read` scope or when the requesting user is not allowed to list members in this project.
'404':
"$ref": "../../responses.yaml#/404"
'429':
"$ref": "../../responses.yaml#/429"
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/members" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase members by_project \
--project_id <project_id> \
--access_token <token>
x-cli-version: '2.5'
26 changes: 26 additions & 0 deletions schemas/project_member.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
project_member:
type: object
title: project_member
properties:
id:
type: string
username:
type: string
name:
type: string
position:
type: string
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
example:
id: acbdacbdacbdacbdacbdacbd
username: myname
name: My Name
position: Lead Developer
created_at: "2020-12-07T12:56:21Z"
updated_at: "2020-12-09T12:56:21Z"
Loading