v2 > Services > ProjectsGet
Get one or more projects in Matter. The get result is organized in pages.
URL
/connect/v2/projects/get
Method:
GET
URL Params
Param | Type | Required | Description | Domain of value |
---|---|---|---|---|
locale |
string | Yes | A Matter supported locale | 'de', 'es_MX', 'en', 'fr' or 'zh_CN' |
pageNumber |
number | Yes | The page number the search result will start from | Positive integer greater than 0 |
pageSize |
number | Yes | The maximum number of result by page | Integer between 1 and 100 |
Sample URL
/connect/v2/projects/get?locale=en&pageNumber=1&pageSize=10
Request :
The request has no body.
Response :
Field | Type | Presence | Description | Domain of value |
---|---|---|---|---|
status |
object | Always | The execution status | A status object |
status.state |
string | Always | The state of execution | 'SUCCESS' or 'ERROR' |
status.code |
string | On error | The general error code and message | See Errors reference |
status.messages[] |
array of string | On error | List of error causes | A validation message or other causes |
result |
object | On success | The execution result | A result object |
result.entityType |
string | On success | The type of entity this result is about | 'PROJECT' |
result.searchInfo |
object | On success | Informations about the search result pages | A searchInfo object |
result.searchInfo.numberOfElements |
object | On success | The total number of elements found | A positive integer |
result.searchInfo.numberOfPages |
object | On success | The total number of pages | NumberOfElements / pageSize |
result.data[] |
array of object | On success | The actual search result : a list of projects | Array of project object |
result.data[].originId |
string | On success | The project unique origin ID | A UUID |
result.data[].name |
string | On success | The project name | Any string |
result.data[].description |
string | On success | The project description | Any string |
result.data[].clientName |
string | On success | The project client | Any string |
result.data[].projectPhase |
string | On success | The project phase | ProjectPhasesLookup |
result.data[].projectStatus |
string | On success | The project status | ProjectStatusesLookup |
result.data[].projectType |
string | On success | The project type | ProjectTypesLookup |
result.data[].projectUnit |
string | On success | The project unit | ProjectUnitsLookup |
result.data[].location |
object | On success | The project location | A location object |
result.data[].location.city |
string | On success | The location city name | Any string |
result.data[].location.region |
string | On success | The location region | Any string |
result.data[].location.country |
string | On success | The location country | Any string |
result.data[].logoUrl |
object | On success | The project logo URL | A logoUrl object |
result.data[].logoUrl.originalUrl |
string | On success | The project logo original URL | A public facing URL |
result.data[].logoUrl.referenceUrl |
string | On success | The project logo reference URL | A public facing URL |
result.data[].lastUpdated |
date | On success | The project name | A ISO-8601 date |
connectRequest |
object | Always | The exact request sent that produced this response | A ProjectsGet request |
Sample Response (Success):
HTTP Code : 200
{
"status": {
"state": "SUCCESS",
"code": null
},
"result": {
"entityType": "PROJECT",
"searchInfo": {
"numberOfElements": "1",
"numberOfPages": "1"
},
"data": [
{
"originId": "c5b45dd2-2f9f-4b47-93b8-1af641b95e2e",
"name": "Project #1",
"description": "Project Description",
"clientName": "A client",
"logoUrl": {
"referenceUrl": "/storage/111-file.jpg"
},
"projectPhase": "PRJ_PHASE_PROGRAMMING_AND_FEASIBILITY",
"projectStatus": "PRJ_STATUS_ON_GOING",
"projectType": "COMMERCIAL",
"projectUnit": "UNIT_METRIC",
"location": {
"city": "Quebec",
"region": "Quebec",
"country": "Canada"
}
}
]
},
"connectRequest": {
"locale": "en",
"pageNumber": "1",
"pageSize": "10",
"contextCompanyOriginId": null
}
}
Sample Response (Error):
HTTP Code : 400, 500
{
"status": {
"state": "ERROR",
"code": "CE00001 - Connect request failed validation. Refer to provided messages for details.",
"messages": [
"Request has invalid value '0' for field pageNumber. Allowed value(s) : [positive integer not equal zero]",
]
},
"connectRequest": {
"locale": "en",
"pageNumber": "0",
"pageSize": "1",
}
}