Skip to content

Commit 205217f

Browse files
committed
PROGX-837: Documentation for permissions API
1 parent 93698a0 commit 205217f

File tree

6 files changed

+156
-2
lines changed

6 files changed

+156
-2
lines changed

content/files/Akeneo PIM API.postman_collection.json

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5133,6 +5133,79 @@
51335133
}
51345134
]
51355135
},
5136+
{
5137+
"name": "Permissions (Channels)",
5138+
"item": [
5139+
{
5140+
"name": "Get User Channels Permissions",
5141+
"request": {
5142+
"method": "GET",
5143+
"header": [
5144+
{
5145+
"key": "Authorization",
5146+
"value": "Bearer {{token}}"
5147+
},
5148+
{
5149+
"key": "Content-type",
5150+
"value": "application/json"
5151+
}
5152+
],
5153+
"url": {
5154+
"raw": "{{url}}/api/rest/v1/permissions/{{userId}}/channels",
5155+
"host": [
5156+
"{{url}}"
5157+
],
5158+
"path": [
5159+
"api",
5160+
"rest",
5161+
"v1",
5162+
"permissions",
5163+
"{{userId}}",
5164+
"channels"
5165+
]
5166+
}
5167+
},
5168+
"response": []
5169+
}
5170+
]
5171+
},
5172+
5173+
{
5174+
"name": "Permissions (Locales)",
5175+
"item": [
5176+
{
5177+
"name": "Get User Locales Permissions",
5178+
"request": {
5179+
"method": "GET",
5180+
"header": [
5181+
{
5182+
"key": "Authorization",
5183+
"value": "Bearer {{token}}"
5184+
},
5185+
{
5186+
"key": "Content-type",
5187+
"value": "application/json"
5188+
}
5189+
],
5190+
"url": {
5191+
"raw": "{{url}}/api/rest/v1/permissions/{{userId}}/locales",
5192+
"host": [
5193+
"{{url}}"
5194+
],
5195+
"path": [
5196+
"api",
5197+
"rest",
5198+
"v1",
5199+
"permissions",
5200+
"{{userId}}",
5201+
"locales"
5202+
]
5203+
}
5204+
},
5205+
"response": []
5206+
}
5207+
]
5208+
},
51365209
{
51375210
"name": "Extensions",
51385211
"item": [
@@ -5972,4 +6045,4 @@
59726045
}
59736046
}
59746047
]
5975-
}
6048+
}

content/swagger/akeneo-web-api.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

content/swagger/paths.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
/api/rest/v1/jobs/import/{code}:
4545
$ref: ./resources/jobs/routes/import.yaml
4646

47+
/api/rest/v1/permissions/{user_id}/locales:
48+
$ref: ./resources/permissions/routes/locales.yaml
49+
/api/rest/v1/permissions/{user_id}/channels:
50+
$ref: ./resources/permissions/routes/channels.yaml
51+
4752
/api/rest/v1/families:
4853
$ref: ./resources/families/routes/families.yaml
4954
/api/rest/v1/families/{code}:
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
get:
2+
summary: Get user's channels permissions
3+
operationId: get_permissions_channels
4+
description: This endpoint allows you to get the channels' permissions for a given user.
5+
tags:
6+
- Permissions
7+
x-versions:
8+
- "SaaS"
9+
parameters:
10+
- name: user_id
11+
in: path
12+
type: string
13+
description: User ID
14+
required: true
15+
responses:
16+
200:
17+
description: OK
18+
x-details: Returns the user's channels permissions
19+
x-examples-per-version:
20+
- x-version: 'SaaS'
21+
x-example:
22+
userId: "12345"
23+
channels:
24+
ecommerce:
25+
canView: "true"
26+
canEdit: "false"
27+
mobile:
28+
canView: "false"
29+
canEdit: "true"
30+
401:
31+
$ref: "#/responses/401Error"
32+
403:
33+
$ref: "#/responses/403Error"
34+
404:
35+
$ref: "#/responses/404Error"
36+
406:
37+
$ref: "#/responses/406Error"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
get:
2+
summary: Get user's locales permissions
3+
operationId: "get_permissions_locales"
4+
description: This endpoint allows you to get the locales' permissions about a given user.
5+
tags:
6+
- Permissions
7+
x-versions:
8+
- "SaaS"
9+
parameters:
10+
- name: user_id
11+
in: path
12+
type: string
13+
description: User ID
14+
required: true
15+
responses:
16+
200:
17+
description: OK
18+
x-details: Returns the User's locales permissions
19+
x-examples-per-version:
20+
- x-version: 'SaaS'
21+
x-example:
22+
userId: "12345"
23+
locales:
24+
en_US:
25+
canView: "true"
26+
canEdit: "false"
27+
fr_FR:
28+
canView: "false"
29+
canEdit: "true"
30+
401:
31+
$ref: "#/responses/401Error"
32+
403:
33+
$ref: "#/responses/403Error"
34+
404:
35+
$ref: "#/responses/404Error"
36+
406:
37+
$ref: "#/responses/406Error"

tasks/reference.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ function determineCategory(tag){
8484
return 'Extensions';
8585
case 'Jobs':
8686
return 'Jobs';
87+
case 'Permissions':
88+
return 'Permissions';
8789
case 'Workflow':
8890
case 'Workflow execution':
8991
case 'Workflow task':

0 commit comments

Comments
 (0)