Something (extobjs)
Requests
HTTP verb | Endpoint | Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creation of 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"
}
}
List retrieval 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 be issued. |
|
|
The maximum number of resources in the list. |
|
|
The sort order of the resources in the list. |
|
|
Conversion to flat form of composite fields. |
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 extobj list with filter by type
A query is a retrieval of data from a collection, the parameters and return value are similar to a request List retrieval extobj. Searches for filtered entities by the type field specified in the URL.
Data retrieval extobj
Request
Name | Type | Description |
---|---|---|
|
|
A list of fields to output. |
|
|
Conversion to flat form of composite fields. |
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"
}
}
Data modification extobj
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"
}
}
Deletion extobj
Search for object identifier
Searches the resource for the specified key, returns the identifier(s) to build the endpoint.
Key fields to search for: id, type
Request
LOOKUP /rest/v1/reference/extobjs HTTP/1.1
Content-Type: application/json; charset=utf-8
"mytype"
Response
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
[
"f199b9f2-016c-b30f-e345-50e54938780c"
]
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
{
"error_code": 1404,
"error_message": "Lookup failed"
}