Administration /admin
/admin endpoint deals with administrative operations on current project.
Managed resources by this endpoint are:
applications
auth providers
asynchronous jobs
configuration properties
custom endpoints
external auth links
Each managed resource follows the same CRUD pattern:
POST /admin/{resource}create resourceGET /admin/{resource}list resourcesGET /admin/{resource}/{id}get single resourcePATCH /admin/{resource}/{id}modify resourceDELETE /admin/{resource}/{id}remove resource
Applications
Applications are managed through /admin/applications.
Available operations are:
POST /admin/applicationsGET /admin/applicationsGET /admin/applications/{id}PATCH /admin/applications/{id}DELETE /admin/applications/{id}
Example request: create application:
POST /admin/applications HTTP/1.1
Host: api.example.com
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
{
"data": {
"type": "applications",
"attributes": {
"name": "my-very-first-app",
"description": "My first app"
}
}
}
Auth Providers
Auth providers are managed through /admin/auth_providers.
Available operations are:
POST /admin/auth_providersGET /admin/auth_providersGET /admin/auth_providers/{id}PATCH /admin/auth_providers/{id}DELETE /admin/auth_providers/{id}
Example request: create auth provider:
POST /admin/auth_providers HTTP/1.1
Host: api.example.com
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
{
"data": {
"type": "auth_providers",
"attributes": {
"name": "my-provider"
}
}
}
Async Jobs
Asynchronous jobs are managed through /admin/async_jobs.
Available operations are:
POST /admin/async_jobsGET /admin/async_jobsGET /admin/async_jobs/{id}PATCH /admin/async_jobs/{id}DELETE /admin/async_jobs/{id}
Example request: create async job:
POST /admin/async_jobs HTTP/1.1
Host: api.example.com
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
{
"data": {
"type": "async_jobs",
"attributes": {
"service": "dummy"
}
}
}
Configuration
Configuration properties are managed through /admin/config.
Available operations are:
POST /admin/configGET /admin/configGET /admin/config/{id}PATCH /admin/config/{id}DELETE /admin/config/{id}
Example request: create config:
POST /admin/config HTTP/1.1
Host: api.example.com
Accept: application/vnd.api+json
Content-Type: application/json
{
"data": {
"id": "TestConf",
"type": "config",
"attributes": {
"name": "TestConf",
"content": "config content",
"context": "config-context"
}
}
}
Endpoints
Custom endpoints are managed through /admin/endpoints.
Available operations are:
POST /admin/endpointsGET /admin/endpointsGET /admin/endpoints/{id}PATCH /admin/endpoints/{id}DELETE /admin/endpoints/{id}
Example request: create endpoint:
POST /admin/endpoints HTTP/1.1
Host: api.example.com
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
{
"data": {
"type": "endpoints",
"attributes": {
"name": "my_endpoint",
"description": "My first endpoint"
}
}
}
External Auth
External auth mappings are managed through /admin/external_auth.
Available operations are:
POST /admin/external_authGET /admin/external_authGET /admin/external_auth/{id}PATCH /admin/external_auth/{id}DELETE /admin/external_auth/{id}
Example request: create external auth mapping:
POST /admin/external_auth HTTP/1.1
Host: api.example.com
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
{
"data": {
"type": "external_auth",
"attributes": {
"user_id": 1,
"auth_provider_id": 1,
"provider_username": "id"
}
}
}
Response codes
For all admin resources, expected responses are:
201 Createdfor successful creation200 OKfor list/get/modify operations204 No Contentfor delete operations404 Not Foundfor missing resources