Metadata

Store metadata in a process

The metadata for a process allows you to store arbitrary JSON data with that process, e.g. if you have an app that uses the datarhei Core API you can store app-specific information in the metadata.

In order not to conflict with other apps that might write to the metadata as well, you have to provide a key under which your metadata is stored. Think of a namespace or similar.

Create, Update

Add or update the metadata for a process and key.

Example: Write a metadata object into the metadata for the process test and key desc.

curl http://127.0.0.1:8080/api/v3/process/test/metadata/desc \
   -H 'accept: application/json' \
   -H 'Content-Type: application/json' \
   -X POST \
   -d '{
         "title": "My title",
         "description": "My description."
      }'

Description:

Add JSON metadata with a process under the given key

put

Add arbitrary JSON metadata under the given key. If the key exists, all already stored metadata with this key will be overwritten. If the key doesn't exist, it will be created.

Authorizations
Path parameters
idstringRequired

Process ID

keystringRequired

Key for data store

Body
anyOptional
Responses
200
OK
application/json
Responseany
put
PUT /v3/process/{id}/metadata/{key} HTTP/1.1
Host: api
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*

No content

Read

Read out the stored metadata. The key is optional. If the key is not provided, all stored metadata for that process will be in the result.

Example: read the metadata object for process test that is stored under the key desc.

curl http://127.0.0.1:8080/api/v3/process/test/metadata/desc \
   -H 'accept: application/json' \
   -X GET

Description:

Retrieve JSON metadata stored with a process under a key

get

Retrieve the previously stored JSON metadata under the given key. If the key is empty, all metadata will be returned.

Authorizations
Path parameters
idstringRequired

Process ID

keystringRequired

Key for data store

Responses
200
OK
application/json
Responseany
get
GET /v3/process/{id}/metadata/{key} HTTP/1.1
Host: api
Authorization: YOUR_API_KEY
Accept: */*

No content

Last updated

Was this helpful?