Statements

Statements are parents to clauses and child nodes of methods.

Statement Object

A statement object includes properties that describe the statement including dependencies and enclosed statements.

Properties

  • Name
    uuid
    Type
    string
    Description

    Unique identifier for the statement.

  • Name
    data
    Type
    array
    Description

    References to clause uuids.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the statement was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    Timestamp of when the statement was last updated.


GET/v1/statement/:id

Retrieve Statement

This endpoint allows you to retrieve a statement for a given uuid.

Request

GET
/v1/statement
curl -G https://api.stellify.com/v1/statement/78abe81c-1aa1-423a-a9b7-f060678474e9 \
  -H "Authorization: Bearer {token}" 


import ApiClient from '@stellisoft/js-api-client'

const client = new ApiClient(token)

await client.statement.get('78abe81c-1aa1-423a-a9b7-f060678474e9')
from stellify_api import ApiClient

client = ApiClient(token)

client.statement.get('78abe81c-1aa1-423a-a9b7-f060678474e9')
$client = new \Stellify\ApiClient($token);

$client->statement->get('78abe81c-1aa1-423a-a9b7-f060678474e9');

Response

{
    "uuid": "78abe81c-1aa1-423a-a9b7-f060678474e9",
    "data": [
        "3eebb320-1820-4af5-948b-f4ed48e8d257",
        "a7c6f2f1-3d6b-4f1c-bb2d-9b0c5f9d8e4a"
    ]
}

POST/v1/statement

Create Statement

This endpoint allows you to create a new statement and attach it to either a page or another statement.

Required attributes

  • Name
    method_id
    Type
    string
    Description

    The method in which to create the statement.

Request

POST
/v1/statement
curl https://api.stellify.com/v1/statement \
  -H "Authorization: Bearer {token}" \
  -d method_id="3eebb320-1820-4af5-948b-f4ed48e8d257" 
import ApiClient from '@stellisoft/js-api-client'

const client = new ApiClient(token)

await client.statement.create({
  method_id: '3eebb320-1820-4af5-948b-f4ed48e8d257',
})
from stellify_api import ApiClient

client = ApiClient(token)

client.statement.create(
  method_id="3eebb320-1820-4af5-948b-f4ed48e8d257",
)
$client = new \Stellify\ApiClient($token);

$client->statement->create([
  'method_id' => '3eebb320-1820-4af5-948b-f4ed48e8d257',
]);

Response

{
    "uuid": "78abe81c-1aa1-423a-a9b7-f060678474e9",
    "data": []
}

PUT/v1/element/:id

Update Statement

This endpoint allows you to perform an update on a statement.

Required attributes

  • Name
    Request JSON Body
    Type
    object
    Description

    The statement object properties as set out above.

Request

PUT
/v1/element/78abe81c-1aa1-423a-a9b7-f060678474e9
curl -X PUT https://api.stellify.com/v1/element/78abe81c-1aa1-423a-a9b7-f060678474e9 \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d "{\"uuid\":\"78abe81c-1aa1-423a-a9b7-f060678474e9\",\"data\":[\"a7c6f2f1-3d6b-4f1c-bb2d-9b0c5f9d8e4a\",\"3eebb320-1820-4af5-948b-f4ed48e8d257\"]}"
import ApiClient from '@stellisoft/js-api-client'

const client = new ApiClient(token)

await client.element.update('78abe81c-1aa1-423a-a9b7-f060678474e9', {
    "uuid": "78abe81c-1aa1-423a-a9b7-f060678474e9",
    "data": ["a7c6f2f1-3d6b-4f1c-bb2d-9b0c5f9d8e4a", "3eebb320-1820-4af5-948b-f4ed48e8d257"],
});
from stellify_api import ApiClient

client = ApiClient(token)

client.element.update("78abe81c-1aa1-423a-a9b7-f060678474e9",
"{\"uuid\":\"78abe81c-1aa1-423a-a9b7-f060678474e9\",\"data\":[\"a7c6f2f1-3d6b-4f1c-bb2d-9b0c5f9d8e4a\",\"3eebb320-1820-4af5-948b-f4ed48e8d257\"]}")
$client = new \Stellify\ApiClient($token);

$client->element->update('78abe81c-1aa1-423a-a9b7-f060678474e9, [
      "uuid" => "78abe81c-1aa1-423a-a9b7-f060678474e9",
      "classes" => ["a7c6f2f1-3d6b-4f1c-bb2d-9b0c5f9d8e4a", "3eebb320-1820-4af5-948b-f4ed48e8d257"],
]);

Response

{
    "uuid": "78abe81c-1aa1-423a-a9b7-f060678474e9",
    "data": [
        "a7c6f2f1-3d6b-4f1c-bb2d-9b0c5f9d8e4a",
        "3eebb320-1820-4af5-948b-f4ed48e8d257"
    ]
}

DELETE/v1/statement/:method_id/:statement_id

Delete Statement

This endpoint allows you to delete a statement and any attached statements and clauses.

Request

DELETE
/v1/statement/3eebb320-1820-4af5-948b-f4ed48e8d257/78abe81c-1aa1-423a-a9b7-f060678474e9
curl -X DELETE https://api.stellify.com/v1/statement/3eebb320-1820-4af5-948b-f4ed48e8d257/78abe81c-1aa1-423a-a9b7-f060678474e9 \
  -H "Authorization: Bearer {token}"
import ApiClient from '@stellisoft/js-api-client'

const client = new ApiClient(token)

await client.messages.delete('3eebb320-1820-4af5-948b-f4ed48e8d257', '78abe81c-1aa1-423a-a9b7-f060678474e9')
from stellify_api import ApiClient

client = ApiClient(token)

client.statement.delete("3eebb320-1820-4af5-948b-f4ed48e8d257", "78abe81c-1aa1-423a-a9b7-f060678474e9")
$client = new \Stellify\ApiClient($token);

$client->statement->delete('3eebb320-1820-4af5-948b-f4ed48e8d257', '78abe81c-1aa1-423a-a9b7-f060678474e9');

Please be aware that our API documentation is under construction.