Extobj (extobjs)
Requests
| HTTP verb | Endpoint | Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a new extobj
Request
Field description: extobj
POST /rest/v1/reference/extobjs HTTP/1.1
Content-Type: application/json; charset=utf-8
extobj
Response
Field description: extobj
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "f199b9f2-016c-b30f-e345-50e54938780c",
"type": "mytype",
"value": {
"obj": {
"name": "Obj",
"no": 2
}
},
"opts": {
"title": "Object 1",
"comment": "second comment",
"user_tags": [
"red",
"mytype",
"once"
]
},
"ext": {
"ct": "2019-08-21T07:24:18.62Z",
"lwt": "2019-08-21T07:24:18.62Z"
}
}
Getting the list of extobj
Request
| Name | Type | Description |
|---|---|---|
|
|
Filter by field values. |
|
|
List of fields to output. Available fields for output: id, type, opts.title, ext.lwt, ext.ct. |
|
|
Offset in the list of resources to output. |
|
|
Maximum number of resources in the list. |
|
|
Sorting order of resources in the list. |
|
|
Transformation of composite fields to flat form. |
GET /rest/v1/reference/extobjs?offset=0&limit=2 HTTP/1.1
Response
Field description: extobj
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "f199b9f2-016c-b30f-e345-50e54938780c",
"type": "mytype",
"opts": {
"title": "Object 1"
},
"ext": {
"ct": "2019-08-21T07:43:53.91Z",
"lwt": "2019-08-21T07:43:53.91Z"
}
},
{
"id": "48ca5b30-016c-b31f-fb85-50e54938780c",
"type": "newType",
"opts": {
"title": "Object 75"
},
"ext": {
"ct": "2019-08-21T07:45:22.17Z",
"lwt": "2019-08-21T07:45:22.17Z"
}
}
]
Getting the list of extobj filtered by type
The request retrieves data from the collection; parameters and the return value are similar to request Getting the list of extobj. Searches for entities filtered by the type field specified in the URL. Without a type in the URL (`/rest/v1/reference/extobjs_by_type`), returns the list of existing type values with links to selections by them.
Getting extobj data
Request
| Name | Type | Description |
|---|---|---|
|
|
List of fields to output. |
|
|
Transformation of composite fields to flat form. |
GET /rest/v1/reference/extobjs/f199b9f2-016c-b30f-e345-50e54938780c HTTP/1.1
Response
Field description: extobj
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "f199b9f2-016c-b30f-e345-50e54938780c",
"type": "mytype",
"value": {
"obj": {
"name": "Obj",
"no": 2
}
},
"opts": {
"title": "Object 1",
"comment": "second comment",
"user_tags": [
"red",
"mytype",
"once"
]
},
"ext": {
"ct": "2019-08-21T07:24:18.62Z",
"lwt": "2019-08-21T07:24:18.62Z"
}
}
Modifying extobj data
Fields prohibited for modification: id
Request
Field description: extobj
PATCH /rest/v1/reference/extobjs/f199b9f2-016c-b30f-e345-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8
{
"value": "{\"obj\":{\"name\":\"Obj\",\"no\":2}}",
"opts": {
"comment": "third comment",
"user_tags": [
"yellow",
"mytype",
"once"
]
}
}
Response
Field description: extobj
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "f199b9f2-016c-b30f-e345-50e54938780c",
"type": "mytype",
"value": "{\"obj\":{\"name\":\"Obj\",\"no\":2}}",
"opts": {
"title": "Object 1",
"comment": "third comment",
"user_tags": [
"yellow",
"mytype",
"once"
]
},
"ext": {
"ct": "2019-08-21T07:24:18.62Z",
"lwt": "2019-09-06T12:46:18.62Z"
}
}