Get All parameter types
The "Get All parameter types" endpoint return the list of all available types. By default these types are
grouped under the parameter
group, so we can retrieve them through a standard
Get All arke of Group
Headers
Key | Value |
arke-project-key | <YOUR_PROJECT_ID> |
Authorization | Bearer <ACCESS_TOKEN> |
content-type | application/json |
Params
Key | Value | Detail |
offset | Start offset for pagination | Discover more |
limit | Count limit for pagination | Discover more |
order | Sorting definition ex. asc;updated_at | Discover more |
filter | Filter response with condition ex. eq(name,test) | Discover more |
load_links | Load links data | Discover more |
depth | Define depth of load_links | Discover more |
HTTP Response status
Status code | Description |
200 | OK |
401 | Unauthorized |
403 | Forbidden |
500 | Internal server error |
Code samples for "Get All parameter types"
GET
/api/lib/group/parameter/arke
curl --location 'https://arkehub.com/api/lib/group/parameter/arke' \
-H "Arke-Project-Key: <YOUR_PROJECT_ID>" \
-H "Authorization: <ACCESS_TOKEN>" \
-H 'Content-Type: application/json' \
Response with types list
{
"content": {
"count": 12,
"items": [
{
"active": true,
"arke_id": "arke",
"id": "binary",
"label": "Binary",
"parameters": ["id","arke_id","default_binary","helper_text","only_run_time","required",...],
"type": "arke",
...
},
{
"active": true,
"arke_id": "arke",
"id": "boolean",
"label": "Boolean",
"parameters": ["id","arke_id","default_binary","helper_text","only_run_time","required",...],
"type": "arke",
...
},
{
"active": true,
"arke_id": "arke",
"id": "date",
"label": "Date",
"parameters": ["id","arke_id","default_binary","helper_text","only_run_time","required",...],
"type": "arke",
...
},
...
]
},
"messages": []
}
Create Parameter
The "Create Parameter" endpoint create a Parameter with the specified information.
Headers
Key | Value |
arke-project-key | <YOUR_PROJECT_ID> |
Authorization | Bearer <ACCESS_TOKEN> |
content-type | application/json |
Body
Key | Value |
<PARAMETER_ID> | <VALUE> |
<PARAMETER_ID_2> | <VALUE> |
<PARAMETER_ID_3> | <VALUE> |
HTTP Response status
Status code | Description |
200 | OK |
401 | Unauthorized |
403 | Forbidden |
500 | Internal server error |
Code samples for "Create Arke"
POST
/api/lib/{parameter_type_id}/unit
curl --location 'https://arkehub.com/api/lib/{parameter_type_id}/unit' \
-H "Arke-Project-Key: <YOUR_PROJECT_ID>" \
-H "Authorization: <ACCESS_TOKEN>" \
-H 'Content-Type: application/json' \
Response with Parameter details created
{
"content": {
"arke_id": "string",
"default_string": null,
"format": "attribute",
"helper_text": null,
"id": "docs_parameter",
"inserted_at": "2024-04-04T18:59:26Z",
"is_primary": false,
"label": "Docs parameter",
"max_length": null,
"metadata": {},
"min_length": null,
"multiple": false,
"nullable": true,
"only_run_time": false,
"persistence": "arke_parameter",
"required": false,
"strip": false,
"unique": false,
"updated_at": "2024-04-04T18:59:26Z",
"values": null,
},
"messages": []
}
Edit Parameter
The "Edit Parameter" endpoint update the specified Parameter information
Headers
Key | Value |
arke-project-key | <YOUR_PROJECT_ID> |
Authorization | Bearer <ACCESS_TOKEN> |
content-type | application/json |
Body
Key | Value |
<PARAMETER_ID> | <NEW_VALUE> |
HTTP Response status
Status code | Description |
200 | OK |
401 | Unauthorized |
403 | Forbidden |
500 | Internal server error |
Code samples for "Edit Parameter"
PUT
/api/lib/{parameter_type_id}/unit/{parameter_id}
curl --location 'https://arkehub.com/api/lib/{parameter_type_id}/unit/{parameter_id}' \
-H "Arke-Project-Key: <YOUR_PROJECT_ID>" \
-H "Authorization: <ACCESS_TOKEN>" \
-H 'Content-Type: application/json' \
Response with Parameter details updated
{
"content": {
{
"arke_id": "string",
"default_string": null,
"format": "attribute",
"helper_text": null,
"label": "Edited Docs parameter",
"id": "docs_parameter",
"inserted_at": "2024-04-04T18:59:26Z",
"updated_at": "2024-04-04T19:59:26Z",
},
},
"messages": []
}
Delete Parameter
Code samples for "Delete Parameter"
DELETE
/api/lib/{parameter_type_id}/unit/{parameter_id}
curl --location 'https://arkehub.com/api/lib/{parameter_type_id}/unit/{parameter_id}' \
-H "Arke-Project-Key: <YOUR_PROJECT_ID>" \
-H "Authorization: <ACCESS_TOKEN>" \
-H 'Content-Type: application/json' \
Response with no content
{
"content": null,
"messages": []
}