Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Resource Types can be accessed through this API using GET, POST, PUT and PATCH. This service retrieves information about resource types.

...

AttributesTypeDescription
descriptionStringThe description of the resource type.
resourceTypeIdLongThe unique Id of the resource type.
resourceTypeNameStringThe unique name of the resource type.
isActiveBooleanThe boolean representing whether the resource type is active. If isActive is updated to null it will default to true.

Response Codes

HTTP Code
Description
200Resource type found and returned
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Resource type not found
500Unexpected internal server error

Example

If we had a resource type in our database with an Id of 10000 and had the following attributes

...

GET (Using Query Parameters)

This GET service will return a list of resource types in the form of JSON objects based on a query parameter for the display name. Resource Types are only returned if they contain the specified parameter. If no query parameters are given this request will return the entire list of resource types.

Info
titleAPI URLs

http://host:port/flexdeploy/rest/v1/administration/resourcetypes?

Append the following character sequences to the above URL to specify Query parameters.

resourceTypeName={resourceTypeName}

Examples:
To return all of the resource types:

http://host:port/flexdeploy/rest/v1/administration/resourcetypes

To search by name only:

http://host:port/flexdeploy/rest/v1/administration/resourcetypes?resourceTypeName={resourceTypeName}

...

AttributesTypeDescription
descriptionStringThe description of the resource type.
resourceTypeIdLongThe unique Id of the resource type.
resourceTypeNameStringThe unique name of the resource type.
isActiveBooleanThe boolean representing whether the resource type is active. If isActive is updated to null it will default to true.

Response Codes

HTTP Code
Description
200Search successful and results returned
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
500Unexpected internal server error

Example

If there are resource types in the database with the following attributes:

...

AttributesTypeDescription
descriptionStringThe description of the resource type.
resourceTypeIdLongThe unique Id of the resource type.
resourceTypeNameStringThe unique name of the resource type.
isActiveBooleanThe boolean representing whether the resource type is active. If isActive is updated to null it will default to true.

Response Codes

HTTP Code
Description
201Resource type created
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
500Unexpected internal server error

Example

If the POST request receives the following JSON resource type object,

...

Info
titleAPI URL

http://host:port/flexdeploy/rest/v1/administration/resourcetypes/{Id}

...

AttributesTypeDescription
descriptionStringThe description of the resource type.
resourceTypeIdLongThe unique Id of the resource type.
resourceTypeNameStringThe unique name of the resource type.
isActiveBooleanThe boolean representing whether the resource type is active. If isActive is updated to null it will default to true.

Response Codes

HTTP Code
Description
200Resource type found and updated
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Resource type not found
500Unexpected internal server error

Example

If we had a resource type in our database with an Id of 10000 and had the following attributes

...

http://host:port/flexdeploy/rest/v1/administration/resourcetypes/10000

...

Code Block
themeEclipse
titleResource Type - 10000
{
    "resourceTypeName": "Oracle Forms and Reports Server Updated",
    "resourceTypeId": 10000,
    "isActive": false,
    "description": "Updated Resource type"
}

PATCH

This PATCH service will update an existing resource type with the information passed through a JSON object. If an attribute of the JSON is null it will not be updated in the resource type.

Info
titleAPI URL

http://host:port/flexdeploy/rest/v1/administration/resourcetypes/{Id}

...

AttributesTypeDescription
descriptionStringThe description of the resource type.
resourceTypeIdLongThe unique Id of the resource type.
resourceTypeNameStringThe unique name of the resource type.
isActiveBooleanThe boolean representing whether the resource type is active. If isActive is updated to null it will default to true.

Response Codes

HTTP Code
Description
200Resource type found and updated
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Resource type not found
500Unexpected internal server error

Example

If we had a resource type in our database with an Id of 10000 and had the following attributes

...

http://host:port/flexdeploy/rest/v1/administration/resourcetypes/10000

...