Use the Resouce API operation to get a list of Resources user has access to.
Get resource List
GET /resources
Accept: application/vnd.ticketing.v2+json
API endpoint : = https://resources.api.rackspace.com/resources
During ticket creation, a category for the ticket is required. Use this operation for the list of resources
Users with the following roles are allowed to consume this endpoint: - identity:user-admin - ticketing:admin - dedicated:default
Request parameters
The request has the following GET parameters:
Name | Type | Description |
---|---|---|
q | String | Search for matching resources. This will check for string matches in the resource id, name, ip addresses, type, and location. (for example critical%20server ) |
offset | Integer | Skip over a number of resources by specifying an offset value for the query. (for example 20) |
limit | Integer | Limit the number of resources in the response.(maximum value500). (for example 400) |
status | String | Filter results to resources that are online (active), offline (inactive), or all. Note that CORE status ids -1, 0, 1, 2 and 50 are always excluded. (for example online ) |
sortBy | String | Sort by a particular field. Supported fields: id, name. (for example name ) |
sort | String | Sort direction. Either ascending (asc) or descending (desc). (for example desc ) |
Request example
The following example shows the JSON request for creating a ticket:
curl --location --request GET $URL?status=online' \
--header 'x-Auth-token: ' \
Response parameters
The response has the following body parameters:
Name | Type | Description |
---|---|---|
resources | Array of Object | Provide details of Resouces |
resources.accountId | String | The ID of the account. |
resources.name | String | The name of the account. |
resources.id | String | device ID. |
resources.platform | String | Platform of resouces. |
resources.type | String | Type of resources. |
resources._links | object | Links to resouces. |
resources._links.self | String | URL to resouce. |
resources.location | String | Location for resources allocated. |
resources.network | object | Network details for resouce. |
resources.addresses | Array of object | Provide netwrok details of resources. |
resources.addresses.type | String | Type of resource. |
resources.addresses.value | String | value of resouce like IP. |
resources.addresses.primary | Bool | This resouce is preimary or not. |
_meta | Object | Provide meta Information |
_meta.totalPages | Integer | Total pages |
_meta.pageTotal | Integer | Total pages fetched |
_meta.pageSize | Integer | Number of resouces details on each page |
_links | Object | Provide links to each page |
_links.self | String | Link to current page |
_links.first | String | Link to First page |
_links.last | String | Link to last page |
_links.prev | String | Link to previous page |
_links.next | String | Link to next page |
total | Integer | Total Number of resouces Available |
Response example
The following example shows the JSON response for the request:
{
"resources": [
{
"accountId": "1234567",
"name": "Payment Server 4",
"id": "dedicated:0000001",
"platform": "DELL PowerEdge R710 Linux",
"type": "Server",
"_links": {
"self": "https://resources.api.rackspace.com/resources/dedicated:0000001"
},
"location": "",
"network": {
"addresses": [
{
"type": "AF_INET",
"value": "X.XX.XX.X",
"primary": true
},
{
"type": "AF_INET",
"value": "X.XX.XX.X",
"primary": false
}
]
}
},
{
"accountId": "1234567",
"name": "Backup FC SAN",
"id": "dedicated:0000005",
"platform": "Managed Shared Storage",
"type": "",
"_links": {
"self": "https://resources.api.rackspace.com/resources/dedicated:0000005"
},
"location": "LON3",
"network": {
"addresses": []
}
},
{
"accountId": "1234567",
"name": "Cisco 2960G",
"id": "dedicated:0000010",
"platform": "Switch",
"type": "Switch",
"_links": {
"self": "https://resources.api.rackspace.com/resources/dedicated:0000010"
},
"location": "LON3",
"network": {
"addresses": []
}
}
],
"_meta": {
"totalPages": 800,
"pageTotal": 4,
"pageSize": 4
},
"_links": {
"self": "https://resources.api.rackspace.com/resources?limit=4&offset=2",
"first": "https://resources.api.rackspace.com/resources?limit=4&offset=0",
"last": "https://resources.api.rackspace.com/resources?limit=4&offset=3196",
"prev": "https://resources.api.rackspace.com/resources?limit=4&offset=0",
"next": "https://resources.api.rackspace.com/resources?limit=4&offset=6"
},
"total": 3197
}
Response codes
This operation can have the following response codes:
Code Name Description 200 Success The request succeeded. 429 Too Many Requests The application has a built-in rate limit of 60 requests per minute. If you exceed this limit, you receive a 429 status code response until the cool off period has elapsed.