Get Arke Struct

The "Get Arke Struct" endpoint return the structure of parameters of specified Arke

Headers

KeyValue
arke-project-key<YOUR_PROJECT_ID>
AuthorizationBearer <ACCESS_TOKEN>
content-typeapplication/json

Params

KeyValueDetail
offsetStart offset for paginationDiscover more
limitCount limit for paginationDiscover more
orderSorting definition ex. asc;updated_atDiscover more
filterFilter response with condition ex. eq(name,test)Discover more
load_linksLoad links dataDiscover more
depthDefine depth of load_linksDiscover more

HTTP Response status

Status codeDescription
200OK
401Unauthorized
403Forbidden
500Internal server error
Code samples for "Get Arke Struct"
GET
/api/lib/arke/struct
curl --location 'https://arkehub.com/api/lib/arke/struct' \
-H "Arke-Project-Key: <YOUR_PROJECT_ID>" \
-H "Authorization: <ACCESS_TOKEN>" \
-H 'Content-Type: application/json' \
Response with Arke struct
{
    "content": {
    "label": "Arke",
    "parameters": [
        {
            "default": "arke",
            "helper_text": "Type",
            "id": "type",
            "label": "Type",
            "max_length": null,
            "min_length": 2,
            "multiple": false,
            "required": true,
            "strip": true,
            "type": "string",
            "values": null
        },{
            "default": false,
            "helper_text": "Remote",
            "id": "remote",
            "label": "Remote",
            "required": true,
            "type": "boolean"
        },
    ...
    ]
},
    "messages": []
}

Get All Arke

The "Get All Arke" endpoint return the list of all available Arke inside the project

Headers

KeyValue
arke-project-key<YOUR_PROJECT_ID>
AuthorizationBearer <ACCESS_TOKEN>
content-typeapplication/json

HTTP Response status

Status codeDescription
200OK
401Unauthorized
403Forbidden
500Internal server error
Code samples for "Get all Arke"
GET
/api/lib/arke/unit
curl --location 'https://arkehub.com/api/lib/arke/unit' \
-H "Arke-Project-Key: <YOUR_PROJECT_ID>" \
-H "Authorization: <ACCESS_TOKEN>" \
-H 'Content-Type: application/json' \
Response with Arke list
{
    "content": {
        "count": 25,
        "items": [
            {
                "active": true,
                "arke_id": "arke",
                "id": "super_admin",
                "inserted_at": "2023-09-14T10:03:48.000000Z",
                "label": "Super Admin",
                "metadata": {},
                "parameters": [],
                "remote": false,
                "type": "arke",
                "updated_at": "2023-09-14T10:03:48.000000Z"
            },
            ...
        ]
    },
    "messages": []
}

Get Arke

The "Get Arke" endpoint return details of the specified Arke

Headers

KeyValue
arke-project-key<YOUR_PROJECT_ID>
AuthorizationBearer <ACCESS_TOKEN>
content-typeapplication/json

HTTP Response status

Status codeDescription
200OK
401Unauthorized
403Forbidden
500Internal server error
Code samples for "Get Arke"
GET
/api/lib/arke/unit/{arke_id}
curl --location 'https://arkehub.com/api/lib/arke/unit/{arke_id}' \
-H "Arke-Project-Key: <YOUR_PROJECT_ID>" \
-H "Authorization: <ACCESS_TOKEN>" \
-H 'Content-Type: application/json' \
Response with Arke details
{
    "content": {
        {
            "active": true,
            "arke_id": "arke",
            "id": "super_admin",
            "inserted_at": "2023-09-14T10:03:48.000000Z",
            "label": "Super Admin",
            "metadata": {},
            "parameters": [],
            "remote": false,
            "type": "arke",
            "updated_at": "2023-09-14T10:03:48.000000Z"
        },
    },
    "messages": []
}

Create Arke

The "Create Arke" endpoint create an Arke with the specified information

Headers

KeyValue
arke-project-key<YOUR_PROJECT_ID>
AuthorizationBearer <ACCESS_TOKEN>
content-typeapplication/json

Body

KeyValue
<PARAMETER_ID><VALUE>
<PARAMETER_ID_2><VALUE>
<PARAMETER_ID_3><VALUE>

HTTP Response status

Status codeDescription
200OK
401Unauthorized
403Forbidden
500Internal server error
Code samples for "Create Arke"
POST
/api/lib/arke/unit
curl --location 'https://arkehub.com/api/lib/arke/unit/{arke_id}' \
-H "Arke-Project-Key: <YOUR_PROJECT_ID>" \
-H "Authorization: <ACCESS_TOKEN>" \
-H 'Content-Type: application/json' \
Response with Arke details created
{
    "content": {
        {
            "active": true,
            "arke_id": "arke",
            "id": "my_arke",
            "inserted_at": "2023-09-14T10:03:48.000000Z",
            "label": "My Arke",
            "metadata": {},
            "parameters": [],
            "remote": false,
            "type": "arke",
            "updated_at": "2023-09-14T10:03:48.000000Z"
        },
    },
    "messages": []
}

Edit Arke

The "Edit Arke" endpoint update the specified Arke information

Headers

KeyValue
arke-project-key<YOUR_PROJECT_ID>
AuthorizationBearer <ACCESS_TOKEN>
content-typeapplication/json

Body

KeyValue
<PARAMETER_ID><NEW_VALUE>

HTTP Response status

Status codeDescription
200OK
401Unauthorized
403Forbidden
500Internal server error
Code samples for "Edit Arke"
PUT
/api/lib/arke/unit/{arke_id}
curl --location 'https://arkehub.com/api/lib/arke/unit/{arke_id}' \
-H "Arke-Project-Key: <YOUR_PROJECT_ID>" \
-H "Authorization: <ACCESS_TOKEN>" \
-H 'Content-Type: application/json' \
Response with Arke details updated
{
    "content": {
{
    "active": true,
    "arke_id": "arke",
    "id": "super_admin",
    "inserted_at": "2023-09-14T10:03:48.000000Z",
    "label": "Edited Super Admin Arke label",
    "metadata": {},
    "parameters": [],
    "remote": false,
    "type": "arke",
    "updated_at": "2023-09-14T10:03:48.000000Z"
},
},
    "messages": []
}

Delete Arke

The "Delete Arke" endpoint delete the specified Arke

Headers

KeyValue
arke-project-key<YOUR_PROJECT_ID>
AuthorizationBearer <ACCESS_TOKEN>
content-typeapplication/json

HTTP Response status

Status codeDescription
204OK
401Unauthorized
500Internal server error
Code samples for "Delete Arke"
DELETE
/api/lib/arke/unit/{arke_id}
curl --location 'https://arkehub.com/api/lib/arke/unit/{arke_id}' \
-H "Arke-Project-Key: <YOUR_PROJECT_ID>" \
-H "Authorization: <ACCESS_TOKEN>" \
-H 'Content-Type: application/json' \
Response with no content
{
    "content": null,
    "messages": []
}

Custom functions

The "Custom function" endpoint allows you to invoke a custom function directly from your backend.

On your arke backend you can create an elixir function in your /backend/<ARKE>.ex file, calling this endpoint you'll receive a response directly from this function.

Headers

KeyValue
arke-project-key<YOUR_PROJECT_ID>
AuthorizationBearer <ACCESS_TOKEN>
content-typeapplication/json

Body

KeyValue
<CUSTOM_PARAMETER>You can pass custom parameters required by the function

HTTP Response status

Status codeDescription
200OK
401Unauthorized
403Forbidden
500Internal server error
Code samples for "Custom functions"
GET
POST
/api/lib/{arke_id}/function/{function_name}
curl --location 'https://arkehub.com/api/lib/{arke_id}/{function_name}' \
-H "Arke-Project-Key: <YOUR_PROJECT_ID>" \
-H "Authorization: <ACCESS_TOKEN>" \
-H 'Content-Type: application/json' \
Response of function
{
    "content": {
        // Custom data response
    },
    "messages": []
}