API
|
Method
|
Syntax
|
Request Body
|
Response Body
|
HTTP Status Codes
|
Notes
|
Query Packages
|
GET
|
[+]Show
/grs/v1/tenant/{tenantId}/businessnode/{nodeId}/packages
|
N/A
|
[+]Show
{
"packages":[
{
"packageId":"1fb18a53-17b2-4ae1-81c7-1614f483c754",
"name":"dmd",
"type":"samples",
"businessName":"XYZ",
"description":"SamplePackage",
"templates":[
{
"name":"XYZ",
"version":1,
"type":null,
"global":false,
"changeComment":null
}
]
}
]
}
|
- 200 OK—Response body provided
- 401 Unauthorized—APIToken not valid
- 403 Forbidden—User does not have permission for the specified tenant or business node.
- 503—Service Unavailable
|
User must have permission to view the specified tenant and business node.
|
Query Package Details
|
GET
|
[+]Show
/grs/v1/tenant/{tenantId}/businessnode/{nodeId}/package/{packageId}
|
N/A
|
[+]Show
{
"packageId":"1fb18a53-17b2-4ae1-81c7-1614f483c754",
"name":"dmd",
"type":"samples",
"businessName":"XYZ",
"description":"SamplePackage
Note: Must enable wildcards for this to work
decision-table-enable-wildcards=true",
"templates":[
{
"name":"XYZ",
"version":1,
"type":samples,
"global":false,
"changeComment":"Initial"
}
]
}
|
- 200 OK—Response body provided
- 401 Unauthorized—APIToken not valid
- 404 Not Found—could not find specified package ID. Use Query Packages to obtain correct ID.
- 503—Service Unavailable
|
|
Create Package
|
POST
|
[+]Show
/grs/v1/tenant/{tenantId}/businessnode/{nodeId}/package
|
[+]Show
{
"name":"XYZ",
"type":"samples",
"businessName":"XYZ",
"description":"SamplePackage
Note: Must enable wildcards for this to
work decision-table-enable-wildcards=true",
"templates":[
{
"name":"Existing Template",
"version":7
},
{
"name":"A new template",
"version":2
}
]
}
|
[+]Show
{
"packageId", "f44268af-dd9e-4035-ba1f-acd53d78fc89",
"name":"XYZ",
"type":"samples",
"businessName":"XYZ",
"description":"SamplePackage",
"templates":[
{
"name":"Existing Template",
"version":7
},
{
"name":"A new template",
"version":2
}
]
}
|
- 201 Created—Response body provided
- 401 Unauthorized—APIToken not valid
- 403 Forbidden—User does not have permission for the specified tenant or business node, or does not have proper permission to perform this operation.
- 422 Unprocessable Entry—Field Validation Error
[+]Show
{
"message": "Validation Failed",
"errors": [
{
"code" : "1000",
"field" : "name",
"message": "package name must be specified"
}
]
}
Other possible return values:
- 1001—name—package name contains invalid character(s)
- 1002—name—package name cannot contain java keyword(s)
- 1003—name—package name already in use
- 1004—type—package type must be specified
- 1005—templates—specified template: {templatename} version: {version} not found
- 1006—businessName—business name already in use
- 503—Service Unavailable
|
|
Modify Package
|
PUT
|
[+]Show
/grs/v1/tenant/{tenantId}/businessnode/{nodeId}/package/{packageId}
|
[+]Show
{
"businessName":"New Business Name",
"description":"New Description",
"templates":[
{
"name":"XYZ",
"version":1
},
{
"name":"AnotherTemplate",
"version":2
}
]
}
|
[+]Show
{
"name":"XYZ",
"type":"samples",
"businessName":"New Business Name",
"description":"New Description",
"templates":[
{
"name":"SamplePackage",
"version":1
},
{
"name":"AnotherTemplate",
"version":2
}
]
}
|
- 200 OK—Response body provided
- 401 Unauthorized—APIToken not valid
- 403 Forbidden—User does not have permission for the specified tenant or business node, or does not have proper permission to perform this operation.
- 422 - Unprocessable Entry - Field Validation Error
[+]Show
{
"message": "Validation Failed",
"errors": [
{
"code" : "1006",
"field" : "businessName",
"message": "busnessName already in use"
}
]
}
- 1005—templates—specified template: {templatename} version: {version} not found
- 1006—businessName—business name already in use
- 503—Service Unavailable
|
User must have MODIFY_PACKAGE permission. User can modify the following fields:
- businessName
- description
- templates
Any other fields modified will be ignored.
|
Delete Package
|
DELETE
|
[+]Show
/grs/v1/tenant/{tenantId}/businessnode/{nodeId}/package/{packageId}
|
N/A
|
N/A
|
- 204 No Content—Returned if successful operation
- 401 Unauthorized—APIToken not valid
- 403 Forbidden—User does not have permission for the specified tenant or does not have proper permission to perform this operation.
- 404 Not Found—Could not find specified package ID.
- 503—Service Unavailable
|
User must have PACKAGE_DELETE permission.
|