Something (extobjs)

Requests

HTTP verb Endpoint Description

POST

/rest/v1/reference/extobjs

Creation of a new extobj

GET

/rest/v1/reference/extobjs

List retrieval extobj

GET

/rest/v1/reference/extobjs_by_type/<type>

Getting extobj list with filter by type

GET

/rest/v1/reference/extobjs/<id>

Data retrieval extobj

PATCH

/rest/v1/reference/extobjs/<id>

Data modification extobj

DELETE

/rest/v1/reference/extobjs/<id>

Deletion extobj

LOOKUP

/rest/v1/reference/extobjs

Search for object identifier


Creation of a new extobj

Request

Field Description: extobj

Request example
POST /rest/v1/reference/extobjs HTTP/1.1
Content-Type: application/json; charset=utf-8

extobj

Response

Field Description: extobj

Response example
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

Table 1. Request parameters
Name Type Description

filter

object

Filter by field values.

mask

str

List of fields to output. Available fields for output: id, type, opts.title, ext.lwt, ext.ct.

offset

int

Offset in the list of resources to be issued.

limit

int

The maximum number of resources in the list.

order

array<object|str>

The sort order of the resources in the list.

flat

bool

Conversion to flat form of composite fields.

Request example
GET /rest/v1/reference/extobjs?offset=0&limit=2 HTTP/1.1

Response

Field Description: extobj

Response example
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.

Request

Request example
GET /rest/v1/reference/extobjs_by_type/mytype?mask=id,type,opts&limit=2 HTTP/1.1

Response

Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

[
  {
    "id": "f199b9f2-016c-b30f-e345-50e54938780c",
    "type": "mytype",
    "opts": {
      "title": "Object 1"
    }
  },
  {
    "id": "1830aa72-016c-6b70-75a1-02004c4f4f50",
    "type": "mytype",
    "opts": {
      "title": "Object 2"
    }
  }
]

Data retrieval extobj

Request

Table 2. Request parameters
Name Type Description

mask

str

A list of fields to output.

flat

bool

Conversion to flat form of composite fields.

Request example
GET /rest/v1/reference/extobjs/f199b9f2-016c-b30f-e345-50e54938780c HTTP/1.1

Response

Field Description: extobj

Response example
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

Request example
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

Response example
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

Request

Request example
DELETE /rest/v1/reference/extobjs/f199b9f2-016c-b30f-e345-50e54938780c HTTP/1.1

Response

Response example
HTTP/1.1 204 No Content

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

Request example
LOOKUP /rest/v1/reference/extobjs HTTP/1.1
Content-Type: application/json; charset=utf-8

"mytype"

Response

Example of a successful response
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8

[
  "f199b9f2-016c-b30f-e345-50e54938780c"
]
Example of an unsuccessful response
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8

{
  "error_code": 1404,
  "error_message": "Lookup failed"
}