ApiAccesses API

create new entry

POST /api/rest/admin/api-accesses

Parameters

Name Description
data[type] Resource type (api-accesses)
data[attributes][customer-id] Customer id
data[attributes][login] Login
data[attributes][password] Password
data[attributes][account-ids] Account ids
data[attributes][allowed-ips] Allowed ips

Request

Headers

Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjI3LCJhdWQiOlsiYWRtaW4iXSwiZXhwIjoxNzcyMjExOTk5fQ.Fi4HpkdjCLnvzm-scIt26TJPvUxcHgx5MGtUxDDg7Xs
Host: example.org
Cookie: 

Route

POST /api/rest/admin/api-accesses

Body

{"data":{"type":"api-accesses","attributes":{"customer-id":10,"login":"login","password":"111111","account-ids":[26],"allowed-ips":["127.0.0.1","127.0.0.2"]}}}

Response

Headers

x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/vnd.api+json
location: http://example.org/api/rest/admin/api-accesses/4
vary: Accept
etag: W/"259cb8c6186893430176526537da69b2"
cache-control: max-age=0, private, must-revalidate
x-request-id: d4cfb22d-7aea-4d7a-9edc-67b75689169d
x-runtime: 0.016910
content-length: 216

Status

201 Created

Body

{
  "data": {
    "id": "4",
    "type": "api-accesses",
    "links": {
      "self": "http://example.org/api/rest/admin/api-accesses/4"
    },
    "attributes": {
      "customer-id": 10,
      "login": "login",
      "account-ids": [
        26
      ],
      "allowed-ips": [
        "127.0.0.1",
        "127.0.0.2"
      ]
    }
  }
}