Skip to content
Open
Show file tree
Hide file tree
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
78 changes: 78 additions & 0 deletions content/files/Akeneo PIM API.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -5100,6 +5100,84 @@
}
]
},
{
"info": {
"name": "Permissions (Channels)",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Get User Channels Permissions",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{token}}"
},
{
"key": "Content-type",
"value": "application/json"
}
],
"url": {
"raw": "{{url}}/api/rest/v1/permissions/{{userId}}/channels",
"host": [
"{{url}}"
],
"path": [
"api",
"rest",
"v1",
"permissions",
"{{userId}}",
"channels"
]
}
},
"response": []
}
]
},
{
"info": {
"name": "Permissions (Locales)",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Get User Locales Permissions",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{token}}"
},
{
"key": "Content-type",
"value": "application/json"
}
],
"url": {
"raw": "{{url}}/api/rest/v1/permissions/{{userId}}/locales",
"host": [
"{{url}}"
],
"path": [
"api",
"rest",
"v1",
"permissions",
"{{userId}}",
"locales"
]
}
},
"response": []
}
]
},
{
"name": "Authentification by password",
"event": [
Expand Down
2 changes: 1 addition & 1 deletion content/swagger/akeneo-web-api.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions content/swagger/paths.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
/api/rest/v1/jobs/import/{code}:
$ref: ./resources/jobs/routes/import.yaml

/api/rest/v1/permissions/{user_id}/locales:
$ref: ./resources/permissions/routes/locales.yaml
/api/rest/v1/permissions/{user_id}/channels:
$ref: ./resources/permissions/routes/channels.yaml

/api/rest/v1/families:
$ref: ./resources/families/routes/families.yaml
/api/rest/v1/families/{code}:
Expand Down
37 changes: 37 additions & 0 deletions content/swagger/resources/permissions/routes/channels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
get:
summary: Get user's channels permissions
operationId: get_permissions_channels
description: This endpoint allows you to get the channels' permissions for a given user.
tags:
- Permissions
x-versions:
- "SaaS"
parameters:
- name: user_id
in: path
type: string
description: User ID
required: true
responses:
200:
description: OK
x-details: Returns the user's channels permissions
x-examples-per-version:
- x-version: 'SaaS'
x-example:
userId: "12345"
channels:
ecommerce:
canView: "true"
canEdit: "false"
mobile:
canView: "false"
canEdit: "true"
401:
$ref: "#/responses/401Error"
403:
$ref: "#/responses/403Error"
404:
$ref: "#/responses/404Error"
406:
$ref: "#/responses/406Error"
37 changes: 37 additions & 0 deletions content/swagger/resources/permissions/routes/locales.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
get:
summary: Get user's locales permissions
operationId: "get_permissions_locales"
description: This endpoint allows you to get the locales' permissions about a given user.
tags:
- Permissions
x-versions:
- "SaaS"
parameters:
- name: user_id
in: path
type: string
description: User ID
required: true
responses:
200:
description: OK
x-details: Returns the User's locales permissions
x-examples-per-version:
- x-version: 'SaaS'
x-example:
userId: "12345"
locales:
en_US:
canView: "true"
canEdit: "false"
fr_FR:
canView: "false"
canEdit: "true"
401:
$ref: "#/responses/401Error"
403:
$ref: "#/responses/403Error"
404:
$ref: "#/responses/404Error"
406:
$ref: "#/responses/406Error"
2 changes: 2 additions & 0 deletions tasks/reference.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ function determineCategory(tag){
return 'Extensions';
case 'Jobs':
return 'Jobs';
case 'Permissions':
return 'Permissions';
default:
return 'Utilities';
}
Expand Down