Resources

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:

NameTypeDescription
qStringSearch for matching resources. This will check for string matches in the resource id, name, ip addresses, type, and location. (for example critical%20server)
offsetIntegerSkip over a number of resources by specifying an offset value for the query. (for example 20)
limitIntegerLimit the number of resources in the response.(maximum value500). (for example 400)
statusStringFilter 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)
sortByStringSort by a particular field. Supported fields: id, name. (for example name)
sortStringSort 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:

NameTypeDescription
resourcesArray of ObjectProvide details of Resouces
resources.accountIdStringThe ID of the account.
resources.nameStringThe name of the account.
resources.idStringdevice ID.
resources.platformStringPlatform of resouces.
resources.typeStringType of resources.
resources._linksobjectLinks to resouces.
resources._links.selfStringURL to resouce.
resources.locationStringLocation for resources allocated.
resources.networkobjectNetwork details for resouce.
resources.addressesArray of objectProvide netwrok details of resources.
resources.addresses.typeStringType of resource.
resources.addresses.valueStringvalue of resouce like IP.
resources.addresses.primaryBoolThis resouce is preimary or not.
_metaObjectProvide meta Information
_meta.totalPagesIntegerTotal pages
_meta.pageTotalIntegerTotal pages fetched
_meta.pageSizeIntegerNumber of resouces details on each page
_linksObjectProvide links to each page
_links.selfStringLink to current page
_links.firstStringLink to First page
_links.lastStringLink to last page
_links.prevStringLink to previous page
_links.nextStringLink to next page
totalIntegerTotal 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:

CodeNameDescription
200SuccessThe request succeeded.
429Too Many RequestsThe 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.