Links
The _links
object contains links to endpoints of associated resources and is meant to be used manually by new developers to easily navigate our API.
The _links
object can contain several objects. Each object has a descriptive name and the resource link as the href
attribute value.
For example, the party
object may contain the _links
object with the link to the endpoint of the contract party and the link to the endpoint itself, as shown below:
Note:
If the associated resource does not exist or is not accessible, the
href
attribute will benull
.
Links attributes
There are two types of _links
attributes that will differ depending on the endpoint you use.
Paginated endpoints
The table below contains all the attributes available only for the paginated endpoints.
Attribute | Type | Description |
---|---|---|
self | The link to the current page with the specified query parameters. | |
previous | The link to the previous result set. If there are no previous results in the response, the link will be | |
next | The link to the next set of results. If there are no following results in the response, the link will be |
{
"_links": {
"next": {
"href": "https://api.oneflow.com/v1/contracts?limit=1&offset=2"
},
"previous": {
"href": "https://api.oneflow.com/v1/contracts?limit=1&offset=0"
},
"self": {
"href": "https://api.oneflow.com/v1/contracts?limit=1&offset=1"
}
},
...
}
Entity objects
The table below contains all the _links
attributes available for the current entity object.
Attribute | Type | Description |
---|---|---|
self | The link refers to the object to which the | |
contract | The link for getting the current contract. | |
data_fields | The link for getting the list of data fields that exist within the current contract. | |
events | The link for getting the list of events that occur for the current contract. | |
files | The link for getting the list of files available for the current contract. | |
parties | The link for getting the list of parties in the current contract. | |
publish | The link for publishing the current contract. | |
template | The link for getting the template used for creating the current contract. | |
template_type | The link for getting the template type to which the current contract template belongs. | |
workspace | The link for getting the current workspace. |
{
"_links": {
"data_fields": {
"href": "https://api.oneflow.com/v1/contracts/110338/data_fields"
},
"events": {
"href": "https://api.oneflow.com/v1/contracts/110338/events"
},
"files": {
"href": "https://api.oneflow.com/v1/contracts/110338/files"
},
"parties": {
"href": "https://api.oneflow.com/v1/contracts/110338/parties"
},
"publish": {
"href": "https://api.oneflow.com/v1/contracts/110338/publish"
},
"self": {
"href": "https://api.oneflow.com/v1/contracts/110338"
},
"template": {
"href": "https://api.oneflow.com/v1/templates/110048"
},
"template_type": {
"href": "https://api.oneflow.com/v1/template_types/1"
},
"workspace": {
"href": "https://api.oneflow.com/v1/workspaces/190000"
}
},
...
}
Updated 7 months ago