Resources

Retrieving existing resources

Existing resources can be easily retrieved via the GET /resources API call. The response lists all the existing public and private resources available in the system.

  • JSON
  • XML

Retrieving resources

The resources contain the id and URL link of the resource (only public).

 

{{codeStart}}

HTTP 1.1 GET https://api.<region>.whispir.com/resources/?apikey=<your_api_key>

Authorization: Basic asdf98nf89asdvasd2r398h8sdf

x-api-key: your_api_key

Accept: application/vnd.whispir.resource-v1+json

{

"resources": [

{

"name": "singapore.csv",

"scope": "private",

"mimeType": "application/json",

"link": [

{

"uri": "https://api.<region>.whispir.com/resources/D9A8DC34EDRSD7E4?apikey=<your_api_key>",

"rel": "self",

"method": "GET"

}

]

},

{

"name": "australia.json",

"scope": "private",

"mimeType": "application/json",

"link": [

{

"uri": "https://api.<region>.whispir.com/resources/D3E2XCDF3WS4859?apikey=<your_api_key>",

"rel": "self",

"method": "GET"

}

]

},

{

"name": "usa.csv",

"scope": "private",

"mimeType": "text/csv",

"link": [

{

"uri": "https://api.<region>.whispir.com/resources/3E2F6E72642F949?apikey=<your_api_key>",

"rel": "self",

"method": "GET"

}

]

},

{

"name": "users.json",

"scope": "public",

"mimeType": "application/json",

"url": "https://cdn-ap.whispir.com/public/resources/2163b29d4edf1bd77d71a36210d472360cd.json",

"link": [

{

"uri": "https://api.<region>.whispir.com/resources/F1212CF334EDR68?apikey=<your_api_key>",

"rel": "self",

"method": "GET"

}

]

},

{

"name": "whispir-example-bulk-message-1.csv",

"scope": "private",

"mimeType": "text/csv",

"link": [

{

"uri": "https://api.<region>.whispir.com/resources/32SDF43ED6829B2?apikey=<your_api_key>",

"rel": "self",

"method": "GET"

}

]

},

{

"name": "whispir-example-bulk-message-2.csv",

"scope": "private",

"mimeType": "text/csv",

"link": [

{

"uri": "https://api.<region>.whispir.com/resources/C708D712EDRB0?apikey=<your_api_key>",

"rel": "self",

"method": "GET"

}

]

},

{

"name": "whispir-example-bulk-message-3.csv",

"scope": "private",

"mimeType": "text/csv",

"link": [

{

"uri": "https://api.<region>.whispir.com/resources/2FEED897U46E2?apikey=<your_api_key>",

"rel": "self",

"method": "GET"

}

]

}

],

"status": "1 to 7 of 7",

"link": []

}

{{codeEnd}}