Apps

Apps Api Reference

Table of Contents

Apps

List Apps

Request

GET /api/v1/apps

Request Header

Content-Type: application/json
Authorization: Bearer {token}

Response

[
    {
        "id": 1,
        "name": "App Name",
        "description": "App Description",
        "created_at": "2021-01-01 00:00:00",
        "updated_at": "2021-01-01 00:00:00"
    }
]

Detail App

Request

GET /api/v1/apps/{id}

Request Header

Content-Type: application/json
Authorization: Bearer {token}

Response

{
    "id": 1,
    "name": "App Name",
    "description": "App Description",
    "created_at": "2021-01-01 00:00:00",
    "updated_at": "2021-01-01 00:00:00"
}

Update App

Request

PUT /api/v1/apps/{id}

Request Header

Content-Type: application/json
Authorization: Bearer {token}

Request Body

{
    "name": "App Name",
    "description": "App Description"
}

Response

{
    "id": 1,
    "name": "App Name",
    "description": "App Description",
    "created_at": "2021-01-01 00:00:00",
    "updated_at": "2021-01-01 00:00:00"
}

Delete App

Request

DELETE /api/v1/apps/{id}

Request Header

Content-Type: application/json
Authorization: Bearer {token}

Response

{
    "message": "The app has been deleted."
}

Create App

Request

POST /api/v1/apps

Request Header

Content-Type: application/json
Authorization: Bearer {token}

Request Body

{
    "name": "App Name",
    "description": "App Description"
}

Response

{
    "id": 1,
    "name": "App Name",
    "description": "App Description",
    "created_at": "2021-01-01 00:00:00",
    "updated_at": "2021-01-01 00:00:00"
}

Search Apps

Request

GET /api/v1/apps/search?q={query}

Request Header

Content-Type: application/json
Authorization: Bearer {token}

Response

[
    {
        "id": 1,
        "name": "App Name",
        "description": "App Description",
        "created_at": "2021-01-01 00:00:00",
        "updated_at": "2021-01-01 00:00:00"
    }
]

Filter Apps

Request

GET /api/v1/apps/filter?{key}={value}

Request Header

Content-Type: application/json
Authorization: Bearer {token}

Response

[
    {
        "id": 1,
        "name": "App Name",
        "description": "App Description",
        "created_at": "2021-01-01 00:00:00",
        "updated_at": "2021-01-01 00:00:00"
    }
]

Sort Apps

Request

GET /api/v1/apps/sort?{key}={asc|desc}

Request Header

Content-Type: application/json
Authorization: Bearer {token}

Response

[
    {
        "id": 1,
        "name": "App Name",
        "description": "App Description",
        "created_at": "2021-01-01 00:00:00",
        "updated_at": "2021-01-01 00:00:00"
    }
]

Pagination Apps

Request

GET /api/v1/apps/page?page={page}&limit={limit}

Request Header

Content-Type: application/json
Authorization: Bearer {token}

Response

{
    "total": 1,
    "per_page": 10,
    "current_page": 1,
    "last_page": 1,
    "from": 1,
    "to": 1,
    "data": [
        {
            "id": 1,
            "name": "App Name",
            "description": "App Description",
            "created_at": "2021-01-01 00:00:00",
            "updated_at": "2021-01-01 00:00:00"
        }
    ]
}

Export Apps

Request

GET /api/v1/apps/export

Request Header

Content-Type: application/json
Authorization: Bearer {token}

Response

{
    "message": "The apps have been exported."
}

Import Apps

Request

POST /api/v1/apps/import

Request Header

Content-Type: application/json
Authorization: Bearer {token}

Request Body

{
    "file": "apps.csv"
}

Response

{
    "message": "The apps have been imported."
}