GET
/activities/Get activities
Return information about your all users.
All your activitiess data can be returned by GET request to https:// <your_app_subdomain>.user.com/api/public/activities/
You can return a list of your activities.
Request
- CURL
- JavaScript
- PHP
- Python
curl -X GET "https://<your_app_subdomain>.user.com/api/public/activities/"
-H "Authorization: Token <your_64_char_api_key>"
-H "Accept: */*; version=2" -H "Content-Type: application/json"
const headers = {
Accept: "application/json",
Accept: "*/*; version=2",
};
fetch("https://<your_app_subdomain>.user.com/api/public/activities/", {
method: "GET",
headers: headers,
})
.then(function(res) {
return res.json();
})
.then(function(body) {
console.log(body);
});
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','https://<your_app_subdomain>.user.com/api/public/activities/', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://<your_app_subdomain>.user.com/api/public/activities/', headers = headers)
print(r.json())
Response
{
"count": 1,
"next": "http://example.com",
"previous": "http://example.com",
"results": [
{
"id": 1,
"activity_type": 1,
"name": "string",
"datetime": "2019-08-24T14:15:22Z",
"duration": 2147483648,
"description": "string",
"assigned_to": 1,
"deal": 0,
"person": 0,
"company": 0,
"done": true,
"done_date": "2019-08-24T14:15:22Z",
"created_by": 0,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"custom_id": "string"
}
]
}