Skip to main content

Client User Agents API

General notes

Content

Roles collection:

Single role:

Clients collection

Client User Agents index

GET /api/v0/client-user-agents

This method needs permission read on client-user-agent.

Request

Index behaviourDefinition
Paginated by defaultNo
Sortingname, email, phone, user_agent, ip_address
Filtersname:string, email:string, phone:string, user_agent:string, ip_address:string
GET /api/v0/client-user-agents HTTP/1.1
Content-Type: application/json

Response

200 OK

GET /api/v0/client-user-agents HTTP/1.1
Content-Type: application/json

{
"items": [
{
"id": 6,
"name": "Fiktivní klient",
"email": "fiktivní@klient.cz",
"phone": "123456789",
"user_agent": "PostmanRuntime/7.32.2",
"ip_address": "172.18.0.1"
}
]
}

403 Forbidden

GET /api/v0/client-user-agents HTTP/1.1
Content-Type: application/json
Status-Code: 403
{
"type": "Unauthorized",
"message": "Pro tuto akci nemáte oprávnění.",
"id": "c41cc8f9-21ca-412b-9e7a-7496b5da1389",
}

Create Client User Agent

POST /api/v0/client-user-agents

Request

ParamTypeDescriptionRequirements
namestringClient's nameRequired. Must be string.
emailstringClient's emailRequired. Must be string.
phonestringClient's phone numberRequired. Must be string.
POST /api/v0/client-user-agents HTTP/1.1
Content-Type: application/json

{
"id": 6,
"name": "Fiktivní klient",
"email": "fiktivní@klient.cz",
}

Response

200 OK

GET /api/v0/client-user-agents HTTP/1.1
Content-Type: application/json

{
"items": [
{
"id": 6,
"name": "Fiktivní klient",
"email": "fiktivní@klient.cz",
"phone": "123456789",
"user_agent": "PostmanRuntime/7.32.2",
"ip_address": "172.18.0.1"
}
]
}

422 Unprocessable Content

GET /api/v0/client-user-agents HTTP/1.1
Content-Type: application/json
Status-Code: 422
{
"type": "ValidationError",
"message": "Kombinace user agenta a IP adresy není unikátní. Informace o takovém uživateli jsou již známy.",
"id": "94ea6e41-e52c-4d45-99c6-40a5206b4ece"
}


Single Client User Agent

Client User Agent detail

GET /api/v0/client-user-agents/{id}

This method needs permission read on client-user-agents.

Request

GET /api/v0/client-user-agents/1 HTTP/1.1
Content-Type: application/json

Response

200 OK

GET /api/v0/clients/6 HTTP/1.1
Content-Type: application/json

{
"id": 6,
"name": "Fiktivní klient",
"email": "fiktivní@klient.cz",
"phone": "123456789",
"user_agent": "PostmanRuntime/7.32.2",
"ip_address": "172.18.0.1"
}

404 NOT FOUND

Role was not found.

GET /api/v0/clients/2 HTTP/1.1
Content-Type: application/json
Status-Code: 404

{
"type": "NotFound",
"message": "Required model was not found.",
"id": "0cd85449-05fe-4866-9802-8192e6785fc7"
}