Available from 5.6.0.1
...
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v2/ Append the following character sequences to the above URL to specify Query parameters.Use '&' between successive query parameters:resourceTypeId={resourceTypeId} resourceTypeName={resourceTypeName} isActive={isActive} ownerType={ownerType} Examples:To Specify the code parameter only:http://host:port/flexdeploy/rest/v2/administration/resourcetype?resourceTypeId={resourceTypeId} To Specify the code and group code parameters:http://host:port/flexdeploy/rest/v2/resourcetype?resourceTypeId={resourceTypeId}&resourceTypeName={resourceTypeName} To Specify the name, group code, and sub group code parameters:http://host:port/flexdeploy/rest/v2/resourcetype?resourceTypeId={resourceTypeId}&resourceTypeName={resourceTypeName}&ownerType={ownerType} |
Tip |
---|
The query parameters are not case sensitive. Searching by resourceTypeName=NAME is the same as searching by resourceTypeName=name. |
...
Output when querying by isActive through http://host:port/flexdeploy/rest/v2/administration/resourcetype?isActive=false
Code Block | ||
---|---|---|
| ||
[ { "description": "Postman test data 1 updated", "ownerType": null, "resourceTypeName": "Postman Resource Type Test REST 1 updated1", "isActive": false, "createdOn": 1629882360332, "versionNumber": 1, "createdBy": "fdadmin", "resourceTypeId": 20408, "updatedBy": "fdadmin", "updatedOn": 1629883055449 } ] |
...
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v2/administration/resourcetype/{Id} |
Request
Attributes | Type | Required | Description |
---|---|---|---|
Id | URL | Yes | URL parameter for the Id which is used to find and update a Resource Type. |
resourceTypeName | String | Yes | Name of Resource Type. |
isActive | Boolean | No | Whether or not this Resource Type is active. Defaults to true if nothing is passed. |
ownerType | String | No | Owner Type value of the Resource Type. |
Response Codes
HTTP Code | Description |
---|---|
200 | Resource Type was found and updated |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Resource Type not found |
500 | Unexpected internal server error |
Example
If we had an Resource Type in our database with an Id of 20408 and had the following attributes
Code Block | ||
---|---|---|
| ||
{ "description": "Postman test data1", "ownerType": "Workflow", "resourceTypeName": "Postman Resource Type Test REST 1", "isActive": true, "createdOn": 1629882360332, "versionNumber": 1, "createdBy": "fdadmin", "resourceTypeId": 2040520408, "updatedBy": "fdadmin", "updatedOn": 1629882360332 } |
When we run a PUT request at the following URL
http://host:port/flexdeploy/rest/v2/administration/resourcetype/20408
And the PUT request receives the following JSON Resource Type object,
Code Block | ||
---|---|---|
| ||
{ "description": "Postman test data 1 updated", "ownerType": "", "isActive":false, "resourceTypeName": "Postman Resource Type Test REST 1 updated" } |
The PUT request would then update the Resource Type with Id 20408 and return the following JSON Resource Type object.
Code Block | ||
---|---|---|
| ||
{ "description": "Postman test data 1 updated", "ownerType": "", "resourceTypeName": "Postman Resource Type Test REST 1 updated", "isActive": false, "createdOn": 1629882360332, "versionNumber": 2, "createdBy": "fdadmin", "resourceTypeId": 20408, "updatedBy": "fdadmin", "updatedOn": 1629882746226 } |
PATCH
...
Code Block | ||
---|---|---|
| ||
{ "description": "Postman test data1", "ownerType": "Workflow", "resourceTypeName": "Postman Resource Type Test REST 1", "isActive": true, "createdOn": 1629882360332, "versionNumber": 1, "createdBy": "fdadmin", "resourceTypeId": 2040520408, "updatedBy": "fdadmin", "updatedOn": 1629882360332 } |
...