Get All Picklist Definitions
Return a list of the picklist definitions for the specified tenant.
Command
GET https://{server}/api/v1/{tenantId}/picklistDefns
Parameters
| Name | Required | Data Type | Description | Parameter Type |
|---|---|---|---|---|
| tenantId | Yes | String | Unique identifier of the tenant. | Path |
| filter | No | String | Spring Expression Language (EL) filter. Allows you to filter by a set of records (for example: name eq 'name'). The following fields are filterable:
For more details on using the filter query parameter, see Filtering Guidelines |
Query |
| offset | No | String | The number of items to skip before starting to collect the result set. Used with limit. | Query |
| limit | No | String |
The maximum number of results to return. Used with offset. Together, they determine the start index and number of records to return. For example, to return records 5 through 15 that have been sorted by name, use the following: picklistDefns?offset=5&limit=10&orderBy=name |
Query |
| orderBy | No | String | Order by fields, sort order. | Query |
| select | No | String | Select the specific fields to be returned. | Query |
| count | No | String | The number of records to fetch from the database. | Query |
| groupBy | No | String | Categorization of results (group by a field). | Query |
Responses
Status and Error Codes
Successful Response Body
| Field | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| hostId | The identifier of the host instance that is returning the request. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| status | The status of the request. For a successful operation, this field is always 'SUCCESS'. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| content |
Returns an array of records.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| messages | If the status is SUCCESS, this field is always blank. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| count | The number of records returned. |
Examples
| Sample API Call |
|---|
GET http://company.com/api/v1/pX3459712f8/picklistDefns X-Application-Key: 30b5f27a684744116537882dda0e50efb8c5a6e26a7b7ad2f3fcb2c24436a840 Content-Type: application/json Authorization: Bearer eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHB= |
Successful Responses
| Response Body Sample |
|---|
{
"hostId": "09071f29ceccd18667227a94122ba2f1",
"status": "SUCCESS",
"content": [
{
"pickListDefnId": "z22060618112587436363009",
"name": "re_jobcode",
"label": "RE Jobcode",
"description": "Picklist by API for FieldGlass",
"tenantId": "pX2f8122a19",
"referenceType": "API",
"fields": {
"key": [
"jobCodeId"
],
"value": [
"jobCodeName"
]
},
"reference": {
"apiConnectionDefnId": "z22060618112323535908009",
"apiPath": "/resources/{resourceId}/job-codes",
"apiFormat": "Fieldglass"
},
"createdTime": "2022-06-06 18:11:25.990 +0000",
"lastModifiedTime": null,
"createdBy": "tenant_admin",
"lastModifiedBy": null,
"activeFlag": true,
"readOnly": false
},
{
"pickListDefnId": "z22060618112610236222008",
"name": "re_costcenter",
"label": "RE Cost Center",
"description": "Picklist by API for FieldGlass",
"tenantId": "pX2f8122a19",
"referenceType": "API",
"fields": {
"key": [
"costCenterId"
],
"value": [
"costCenterName",
"costCenterCode"
]
},
"reference": {
"apiConnectionDefnId": "z22060618112323535908009",
"apiPath": "/assignments/{assignmentId}/cost-centers",
"apiFormat": "Fieldglass"
},
"createdTime": "2022-06-06 18:11:26.107 +0000",
"lastModifiedTime": null,
"createdBy": "tenant_admin",
"lastModifiedBy": null,
"activeFlag": true,
"readOnly": false
},
{
"pickListDefnId": "z22060618112617236391009",
"name": "RATE_CATEGORY_PICKLIST",
"label": "Rate Category Picklist",
"description": "Picklist which holds all the Rate Categories pushed by FG",
"tenantId": "pX2f8122a19",
"referenceType": "OBJECT",
"fields": {
"key": [
"rateCategoryId"
],
"value": [
"code"
]
},
"reference": {
"name": "RateCategory"
},
"createdTime": "2022-06-06 18:11:26.190 +0000",
"lastModifiedTime": null,
"createdBy": "tenant_admin",
"lastModifiedBy": null,
"activeFlag": true,
"readOnly": false
},
{
"pickListDefnId": "z22060618112628936241008",
"name": "re_ratelookup",
"label": "RE Rate Lookup",
"description": "Picklist by API for FieldGlass",
"tenantId": "pX2f8122a19",
"referenceType": "API",
"fields": {
"key": [
"lookupId"
],
"value": [
"name"
]
},
"reference": {
"apiConnectionDefnId": "z22060618112323535908009",
"apiPath": "/resources/{resourceId}/rate-lookups",
"apiFormat": "Fieldglass"
},
"createdTime": "2022-06-06 18:11:26.297 +0000",
"lastModifiedTime": null,
"createdBy": "tenant_admin",
"lastModifiedBy": null,
"activeFlag": true,
"readOnly": false
},
{
"pickListDefnId": "z2206091951242661979100a",
"name": "StaticFlattenPicklist_employee",
"label": "Static Flat Employee Picklist",
"description": "Static Picklist is having static flatten data as given in below reference-data object",
"tenantId": "pX2f8122a19",
"referenceType": "STATIC",
"fields": {
"key": [
"org",
"dept",
"manager",
"employee"
],
"value": [
"org",
"dept",
"manager",
"employee",
{
"expression": "Welcome ${employee}, ${manager}, ${dept}",
"title": "Greetings"
},
{
"expression": "Welcome ${employee}, ${manager}, ${dept}",
"title": "Greetings2"
}
]
},
"reference": {
"data": [
{
"org": "PI",
"dept": "IT",
"manager": "Jhon",
"employee": "Rich"
},
{
"org": "PI",
"dept": "ITI",
"manager": "Ram",
"employee": "Lee"
},
{
"org": "PI",
"dept": "ITI",
"manager": "Shyam",
"employee": "Mack"
},
{
"org": "PI",
"dept": "ITI",
"manager": "Shyam",
"employee": "Jack"
},
{
"org": "PI",
"dept": "ITI",
"manager": "Shyam",
"employee": "Hussey"
},
{
"org": "PI",
"dept": "ITI",
"manager": "Shyam",
"employee": "Lucky"
},
{
"org": "BI",
"dept": "Sales",
"manager": "Kiran",
"employee": "Gaurav"
},
{
"org": "BI",
"dept": "Sales",
"manager": "Kiran",
"employee": "Ben"
}
]
},
"createdTime": "2022-06-09 19:51:24.300 +0000",
"lastModifiedTime": null,
"createdBy": "tenant_admin",
"lastModifiedBy": null,
"activeFlag": true,
"readOnly": false
},
{
"pickListDefnId": "z2206091959514382001800a",
"name": "StaticNestedPicklist_employee",
"label": "Static Nested Employee Picklist",
"description": "Static Picklist is having static nested data as given in below reference-data object.",
"tenantId": "pX2f8122a19",
"referenceType": "STATIC",
"fields": {
"key": [
"org",
"dept",
"manager",
"employee"
],
"value": [
"org",
"dept",
"manager",
"employee",
{
"expression": "Welcome ${employee}, ${lName}",
"title": "Greetings"
}
]
},
"reference": {
"data": [
{
"_k": "PI",
"_v": [
{
"_k": "ITI",
"_v": [
{
"_k": "Shyam",
"_v": [
{
"_k": "Sagar",
"_v": {
"fName": "Sagar",
"lName": "Kachave"
}
},
{
"_k": "Pradeep",
"_v": {
"fName": "Pradeep",
"lName": "Raut"
}
},
{
"_k": "Roshan",
"_v": {
"fName": "Roshan",
"lName": "Patil"
}
}
]
},
{
"_k": "Ram",
"_v": [
{
"_k": "Lee",
"_v": {
"fName": "Lee",
"lName": "Jong"
}
}
]
}
]
},
{
"_k": "IT",
"_v": [
{
"_k": "Jhon",
"_v": [
{
"_k": "Rich",
"_v": {
"fName": "Rich",
"lName": "Brian"
}
}
]
}
]
}
]
},
{
"_k": "BI",
"_v": [
{
"_k": "Sales",
"_v": [
{
"_k": "Kiran",
"_v": [
{
"_k": "James",
"_v": {
"fName": "James",
"lName": "Charles"
}
}
]
}
]
}
]
}
]
},
"createdTime": "2022-06-09 19:59:51.463 +0000",
"lastModifiedTime": null,
"createdBy": "tenant_admin",
"lastModifiedBy": null,
"activeFlag": true,
"readOnly": false
}
],
"messages": [],
"count": 5
} |