Projects (projects)

Requests

HTTP verb Endpoint Description

POST

/rest/v1/domain/projects

Creating a new project

GET

/rest/v1/domain/projects

Getting the list of projects

GET

/rest/v1/domain/projects/<id>

Obtaining project data

PATCH

/rest/v1/domain/projects/<id>

Changing project data

DELETE

/rest/v1/domain/projects/<id>

Deleting a project

LOOKUP

/rest/v1/domain/projects

Searching for a project identifier


Creating a new project

Request

Field Description: project entity

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

project entity

Response

Field Description: project entity

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

{
  "id": "866c3624-016c-d34e-07a7-50e54938780c",
  "code": "5102",
  "name": "ProjectY",
  "opts": {
    "title": "",
    "comment": ""
  },
  "ext": {
    "ct": "2019-08-27T13:40:02.87Z",
    "lwt": "2019-08-27T13:40:02.87Z"
  }
}

Getting the list of projects

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, code, name, 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/domain/projects?offset=0&limit=2 HTTP/1.1

Response

Field Description: project entity

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

[
  {
    "id": "54e07833-016c-d34d-dc92-50e54938780c",
    "code": "5101",
    "name": "ProjectX",
    "ext": {
      "ct": "2019-08-27T13:38:55.14Z",
      "lwt": "2019-08-27T13:38:55.14Z"
    }
  },
  {
    "id": "866c3624-016c-d34e-07a7-50e54938780c",
    "code": "5102",
    "name": "ProjectY",
    "ext": {
      "ct": "2019-08-27T13:40:02.87Z",
      "lwt": "2019-08-27T13:40:02.87Z"
    }
  }
]

Obtaining project data

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/domain/projects/866c3624-016c-d34e-07a7-50e54938780c HTTP/1.1

Response

Field Description: project entity

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

{
  "id": "866c3624-016c-d34e-07a7-50e54938780c",
  "code": "5102",
  "name": "ProjectY",
  "opts": {
    "title": "",
    "comment": ""
  },
  "ext": {
    "ct": "2019-08-27T13:40:02.87Z",
    "lwt": "2019-08-27T13:40:02.87Z"
  }
}

Changing project data

Fields prohibited for modification: id

Request

Field Description: project entity

Request example
PATCH /rest/v1/domain/projects/866c3624-016c-d34e-07a7-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8

project entity

Response

Field Description: project entity

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

{
  "id": "866c3624-016c-d34e-07a7-50e54938780c",
  "code": "5102",
  "name": "ProjectY",
  "opts": {
    "title": "",
    "comment": ""
  },
  "ext": {
    "ct": "2019-08-27T13:40:02.87Z",
    "lwt": "2019-09-11T10:39:54.27Z"
  }
}

Deleting a project

Request

Request example
DELETE /rest/v1/domain/projects/866c3624-016c-d34e-07a7-50e54938780c HTTP/1.1

Response

Response example
HTTP/1.1 204 No Content

Searching for a project identifier

Searches the resource for the specified key, returns the identifier(s) to build the endpoint.

Key fields to search for: id, code

Request

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

"5102"

Response

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

[
  "866c3624-016c-d34e-07a7-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"
}