Policies

Retrieve Policy

get

Get details of a specific policy by ID.

Authorizations
Path parameters
idintegerRequired

Unique identifier of the resource

Example: 1
Responses
200
Policy details.
application/json
get
GET /api/v1/policies/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "id": 1,
  "users": [
    1
  ],
  "fe_permission_groups": [
    1
  ],
  "accept_languages": [
    "en",
    "es",
    "fr"
  ],
  "created_date": "2024-11-15T00:00:00Z",
  "modified_date": "2024-11-15T00:00:00Z"
}

Update Policy

put

Update the details of an existing policy.

Authorizations
Path parameters
idintegerRequired

Unique identifier of the resource

Example: 1
Body
idintegerRead-onlyOptional

Policy ID

usersinteger[]Optional

List of users associated with the policy.

fe_permission_groupsinteger[]Optional

List of frontend permission groups associated with the policy.

accept_languagesstring[]Optional

List of accepted language codes. If empty, all languages are accepted.

Example: ["en","es","fr"]
created_datestring · date-timeRead-onlyOptional

Created Date

Example: 2024-11-15T00:00:00Z
modified_datestring · date-timeRead-onlyOptional

Modified Date

Example: 2024-11-15T00:00:00Z
Responses
200
The policy was successfully updated.
application/json
put
PUT /api/v1/policies/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 76

{
  "users": [
    1
  ],
  "fe_permission_groups": [
    1
  ],
  "accept_languages": [
    "en",
    "es",
    "fr"
  ]
}
{
  "id": 1,
  "users": [
    1
  ],
  "fe_permission_groups": [
    1
  ],
  "accept_languages": [
    "en",
    "es",
    "fr"
  ],
  "created_date": "2024-11-15T00:00:00Z",
  "modified_date": "2024-11-15T00:00:00Z"
}

Delete Policy

delete

Delete a specific policy by ID.

Authorizations
Path parameters
idintegerRequired

Unique identifier of the resource

Example: 1
Responses
204
The policy was successfully deleted.
delete
DELETE /api/v1/policies/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*

No content

List Policies

get

Retrieve a list of policies with optional filtering.

Authorizations
Query parameters
namestringOptional

Filters by name

created_datestring · date-timeOptional

Filter by creation date using supported lookup expressions (e.g., gt, gte, lt, lte, date__gt, etc.).

Example: created_date__gt=2024-01-01T00:00:00Z
modified_datestring · date-timeOptional

Filter by modification date using supported lookup expressions (e.g., gt, gte, lt, lte, date__gt, etc.).

Example: modified_date__lt=2024-01-01T00:00:00Z
usersinteger[]Optional

Filter by user IDs associated with the policy.

Example: 1
fe_permission_groupsinteger[]Optional

Filter by frontend permission group IDs associated with the policy.

Example: 5
Responses
200
A list of policies.
application/json
get
GET /api/v1/policies/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
[
  {
    "id": 1,
    "users": [
      1
    ],
    "fe_permission_groups": [
      1
    ],
    "accept_languages": [
      "en",
      "es",
      "fr"
    ],
    "created_date": "2024-11-15T00:00:00Z",
    "modified_date": "2024-11-15T00:00:00Z"
  }
]

Create Policy

post

Create a new policy.

Authorizations
Body
idintegerRead-onlyOptional

Policy ID

usersinteger[]Optional

List of users associated with the policy.

fe_permission_groupsinteger[]Optional

List of frontend permission groups associated with the policy.

accept_languagesstring[]Optional

List of accepted language codes. If empty, all languages are accepted.

Example: ["en","es","fr"]
created_datestring · date-timeRead-onlyOptional

Created Date

Example: 2024-11-15T00:00:00Z
modified_datestring · date-timeRead-onlyOptional

Modified Date

Example: 2024-11-15T00:00:00Z
Responses
201
The policy was successfully created.
application/json
post
POST /api/v1/policies/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 76

{
  "users": [
    1
  ],
  "fe_permission_groups": [
    1
  ],
  "accept_languages": [
    "en",
    "es",
    "fr"
  ]
}
{
  "id": 1,
  "users": [
    1
  ],
  "fe_permission_groups": [
    1
  ],
  "accept_languages": [
    "en",
    "es",
    "fr"
  ],
  "created_date": "2024-11-15T00:00:00Z",
  "modified_date": "2024-11-15T00:00:00Z"
}

Was this helpful?