Info
Welcome to the generated API reference. Get Postman Collection
JumpStory Partnership API
Getting started
Requirements
Before getting started, please make sure you have received all necessary information:
- Unique API endpoint URL
- Admin Secret Key
Endpoint URL
An endpoint URL is provided when a partnership has begun.
Example: https://my-company.jumpstory-api.com
In above example my-company would represent an URL compatible version of your company name.
Authorization
JumpStory Partnership API facilitates two types of authentication. Both making use of the Bearer token method.
User endpoints
All /v1/user*
endpoints make use of the Admin Secret Token as Bearer authentication.
All other endpoints
User specific JWT token provided on user creation or by requesting POST /v1/user/{id}/token as admin.
Access token expiration
Please note that a token only grants access for 900 seconds. You can request for a new token via the User Token request.
Video demonstration
For a basic introduction to the API, you can watch this video.
Limitations and throttling
By default the API is throttled by 60 requests/min. To increase the limit, write us.
Any Questions?
Tech related questions: tech@jumpstory.com
Sales related questions: jl@jumpstory.com
Archive
Upload.
Upload an asset to the archive of the user. This endpoint is a POST MULTIPART. Currently accepts files: jpeg,jpg,png,gif. Max. size 2mb.
Example request:
curl -X POST \
"https://sandbox.api.jumpstory.com/v1/archive/file" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/archive/file"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://sandbox.api.jumpstory.com/v1/archive/file',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/archive/file'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Example response (200):
{
"type": "file",
"id": 1,
"name": "my-file.jpg",
"file": "https:\/\/20_MINUTE_EXPIRE_URL",
"thumbnail": "https:\/\/20_MINUTE_EXPIRE_URL",
"labels": [
"apple",
"tree"
]
}
HTTP Request
POST v1/archive/file
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
file |
binary | required | The file to upload. |
Get file.
Example request:
curl -X GET \
-G "https://sandbox.api.jumpstory.com/v1/archive/file/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/archive/file/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://sandbox.api.jumpstory.com/v1/archive/file/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/archive/file/1'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"type": "file",
"id": 1,
"name": "my-file.jpg",
"file": "https:\/\/20_MINUTE_EXPIRE_URL",
"thumbnail": "https:\/\/20_MINUTE_EXPIRE_URL",
"labels": [
"apple",
"tree"
]
}
HTTP Request
GET v1/archive/file/{file}
URL Parameters
Parameter | Status | Description |
---|---|---|
file |
required | File id. |
Update file.
If labels are provided, the previous stored labels will be deleted.
Example request:
curl -X PUT \
"https://sandbox.api.jumpstory.com/v1/archive/file/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"original_name":"my-file.jpg","folder_id":1,"labels":"[\"Shouldnt\", \"Be\", \"Escaped\", \"Array\"]"}'
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/archive/file/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"original_name": "my-file.jpg",
"folder_id": 1,
"labels": "[\"Shouldnt\", \"Be\", \"Escaped\", \"Array\"]"
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://sandbox.api.jumpstory.com/v1/archive/file/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'original_name' => 'my-file.jpg',
'folder_id' => 1,
'labels' => '["Shouldnt", "Be", "Escaped", "Array"]',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/archive/file/1'
payload = {
"original_name": "my-file.jpg",
"folder_id": 1,
"labels": "[\"Shouldnt\", \"Be\", \"Escaped\", \"Array\"]"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"type": "file",
"id": 1,
"name": "my-file.jpg",
"file": "https:\/\/20_MINUTE_EXPIRE_URL",
"thumbnail": "https:\/\/20_MINUTE_EXPIRE_URL",
"labels": [
"apple",
"tree"
]
}
HTTP Request
PUT v1/archive/file/{file}
URL Parameters
Parameter | Status | Description |
---|---|---|
file |
required | File id. |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
original_name |
string | optional | Disaply name of the file. |
folder_id |
integer | optional | Id of the destination folder. |
labels |
array | optional | Array of labels. |
Delete file.
Example request:
curl -X DELETE \
"https://sandbox.api.jumpstory.com/v1/archive/file/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/archive/file/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://sandbox.api.jumpstory.com/v1/archive/file/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/archive/file/1'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (200):
{
"status": "deleted"
}
HTTP Request
DELETE v1/archive/file/{file}
URL Parameters
Parameter | Status | Description |
---|---|---|
file |
required | File id. |
Resize image.
Provides an URL to download resized media.
Example request:
curl -X POST \
"https://sandbox.api.jumpstory.com/v1/archive/file/1/resize" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"height":20,"width":16,"optimize":false}'
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/archive/file/1/resize"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"height": 20,
"width": 16,
"optimize": false
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://sandbox.api.jumpstory.com/v1/archive/file/1/resize',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'height' => 20,
'width' => 16,
'optimize' => false,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/archive/file/1/resize'
payload = {
"height": 20,
"width": 16,
"optimize": false
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"image": "https:\/\/URL_TO_IMAGE_THAT_WILL_EXPIRE_SOON.com"
}
HTTP Request
POST v1/archive/file/{file}/resize
URL Parameters
Parameter | Status | Description |
---|---|---|
file |
required | File id. |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
height |
integer | optional | Define a height to get a scaled version. |
width |
integer | optional | Define a width to get a scaled version. Defaults to 1600 |
optimize |
boolean | optional | Optimize filesize. |
Create folder.
Example request:
curl -X POST \
"https://sandbox.api.jumpstory.com/v1/archive/folder" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"name":"Robots"}'
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/archive/folder"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Robots"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://sandbox.api.jumpstory.com/v1/archive/folder',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'name' => 'Robots',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/archive/folder'
payload = {
"name": "Robots"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"type": "folder",
"id": 7,
"name": "Retired foxes",
"files": []
}
HTTP Request
POST v1/archive/folder
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name |
string | required | Name of the folder. |
Get folder.
Example request:
curl -X GET \
-G "https://sandbox.api.jumpstory.com/v1/archive/folder/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/archive/folder/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://sandbox.api.jumpstory.com/v1/archive/folder/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/archive/folder/1'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"type": "folder",
"id": 7,
"name": "Retired foxes",
"files": [
{
"id": 1,
"name": "my-file.jpg",
"file": "https:\/\/20_MINUTE_EXPIRE_URL",
"thumbnail": "https:\/\/20_MINUTE_EXPIRE_URL",
"labels": [
"apple",
"tree"
]
},
{
"id": 2,
"name": "jumpstory-download20200324-124921.jpg",
"file": "https:\/\/20_MINUTE_EXPIRE_URL",
"thumbnail": "https:\/\/20_MINUTE_EXPIRE_URL",
"labels": [
"snow",
"rabbits"
]
}
]
}
HTTP Request
GET v1/archive/folder/{folder}
URL Parameters
Parameter | Status | Description |
---|---|---|
folder |
required | Folder id. |
Update folder.
Example request:
curl -X PUT \
"https://sandbox.api.jumpstory.com/v1/archive/folder/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"name":"Robots"}'
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/archive/folder/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Robots"
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://sandbox.api.jumpstory.com/v1/archive/folder/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'name' => 'Robots',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/archive/folder/1'
payload = {
"name": "Robots"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"type": "folder",
"id": 7,
"name": "Retired foxes",
"files": [
{
"id": 1,
"name": "my-file.jpg",
"file": "https:\/\/20_MINUTE_EXPIRE_URL",
"thumbnail": "https:\/\/20_MINUTE_EXPIRE_URL",
"labels": [
"apple",
"tree"
]
},
{
"id": 2,
"name": "jumpstory-download20200324-124921.jpg",
"file": "https:\/\/20_MINUTE_EXPIRE_URL",
"thumbnail": "https:\/\/20_MINUTE_EXPIRE_URL",
"labels": [
"snow",
"rabbits"
]
}
]
}
HTTP Request
PUT v1/archive/folder/{folder}
URL Parameters
Parameter | Status | Description |
---|---|---|
folder |
required | Folder id. |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name |
string | optional | Disaply name of the folder. |
Delete folder.
Example request:
curl -X DELETE \
"https://sandbox.api.jumpstory.com/v1/archive/folder/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/archive/folder/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://sandbox.api.jumpstory.com/v1/archive/folder/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/archive/folder/1'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (200):
{
"status": "deleted"
}
HTTP Request
DELETE v1/archive/folder/{folder}
URL Parameters
Parameter | Status | Description |
---|---|---|
folder |
required | Folder id. |
Search files.
Search user archive using keywords.
Example request:
curl -X POST \
"https://sandbox.api.jumpstory.com/v1/archive/search" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"query":"Animal","folder_id":10,"page":1,"results_page":50}'
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/archive/search"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"query": "Animal",
"folder_id": 10,
"page": 1,
"results_page": 50
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://sandbox.api.jumpstory.com/v1/archive/search',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'query' => 'Animal',
'folder_id' => 10,
'page' => 1,
'results_page' => 50,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/archive/search'
payload = {
"query": "Animal",
"folder_id": 10,
"page": 1,
"results_page": 50
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
[
{
"type": "file",
"id": 1,
"name": "my-file.jpg",
"file": "https:\/\/20_MINUTE_EXPIRE_URL",
"thumbnail": "https:\/\/20_MINUTE_EXPIRE_URL",
"labels": [
"apple",
"tree"
]
},
{
"type": "file",
"id": 2,
"name": "jumpstory-download20200324-124921.jpg",
"file": "https:\/\/20_MINUTE_EXPIRE_URL",
"thumbnail": "https:\/\/20_MINUTE_EXPIRE_URL",
"labels": [
"snow",
"rabbits"
]
}
]
HTTP Request
POST v1/archive/search
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
query |
string | required | Keywords to search for. |
folder_id |
integer | optional | optional Provide if searching within a specific folder. |
page |
integer | optional | optional Defaults to 1. |
results_page |
integer | optional | optional Amount of results per page. Defaults to 50. |
Index.
Returns the full index of users archive.
Example request:
curl -X GET \
-G "https://sandbox.api.jumpstory.com/v1/archive/index" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/archive/index"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://sandbox.api.jumpstory.com/v1/archive/index',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/archive/index'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
[
{
"type": "file",
"id": 1,
"name": "my-file.jpg",
"file": "https:\/\/20_MINUTE_EXPIRE_URL",
"thumbnail": "https:\/\/20_MINUTE_EXPIRE_URL",
"labels": [
"apple",
"tree"
]
},
{
"type": "folder",
"id": 7,
"name": "Retired foxes",
"files": [
{
"type": "file",
"id": 1,
"name": "my-file.jpg",
"file": "https:\/\/20_MINUTE_EXPIRE_URL",
"thumbnail": "https:\/\/20_MINUTE_EXPIRE_URL",
"labels": [
"apple",
"tree"
]
},
{
"type": "file",
"id": 2,
"name": "my-file.jpg",
"file": "https:\/\/20_MINUTE_EXPIRE_URL",
"thumbnail": "https:\/\/20_MINUTE_EXPIRE_URL",
"labels": [
"snow",
"rabbits"
]
}
]
}
]
HTTP Request
GET v1/archive/index
Collection
Index
Returns the full index of collections.
Example request:
curl -X GET \
-G "https://sandbox.api.jumpstory.com/v1/collection" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/collection"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://sandbox.api.jumpstory.com/v1/collection',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/collection'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
HTTP Request
GET v1/collection
URL Parameters
Parameter | Status | Description |
---|---|---|
show |
optional | string Decide to show only own owned collection, jumpstory's or both: "all", "own", "jumpstory" |
Show
Show a Collection and its content
Example request:
curl -X GET \
-G "https://sandbox.api.jumpstory.com/v1/collection/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/collection/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://sandbox.api.jumpstory.com/v1/collection/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/collection/1'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
HTTP Request
GET v1/collection/{collection}
Search
Search a collection using keywords.
Example request:
curl -X POST \
"http://jumpstory-api.local/v1/collection/1/search" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"query":"corporis","page":20,"type":"photos","color":"qui","orientation":"iste","people":"voluptates","safesearch":"sit","region":"placeat","order_by":"inventore"}'
const url = new URL(
"http://jumpstory-api.local/v1/collection/1/search"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"query": "corporis",
"page": 20,
"type": "photos",
"color": "qui",
"orientation": "iste",
"people": "voluptates",
"safesearch": "sit",
"region": "placeat",
"order_by": "inventore"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://jumpstory-api.local/v1/collection/1/search',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'query' => 'corporis',
'page' => 20,
'type' => 'photos',
'color' => 'qui',
'orientation' => 'iste',
'people' => 'voluptates',
'safesearch' => 'sit',
'region' => 'placeat',
'order_by' => 'inventore',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'http://jumpstory-api.local/v1/collection/1/search'
payload = {
"query": "corporis",
"page": 20,
"type": "photos",
"color": "qui",
"orientation": "iste",
"people": "voluptates",
"safesearch": "sit",
"region": "placeat",
"order_by": "inventore"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"images": [
{
"id": 1,
"thumbnail_url": "https:\/\/URL_TO_THUMBNAIL.com",
"width": 4000,
"height": 4000,
"orientation": "horizontal",
"type": "photo"
}
]
}
Example response (200):
{
"videos": [
{
"id": 1,
"thumbnail_url": "https:\/\/URL_TO_THUMBNAIL.com",
"small_video": "https:\/\/URL_TO_SMALL_VIDEO.com",
"width": 4000,
"height": 4000,
"orientation": "horizontal",
"type": "video"
}
]
}
HTTP Request
POST v1/collection/{collection}/search
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
query |
string | required | Keywords to search for. |
page |
integer | optional | Pagination |
type |
string | optional | Type of assets.: "photos", "illustrations", "videos", "vectors", "icons". |
color |
string | optional | Filter by color: "all", "red", "orange", "yellow", "green", "turquoise", "blue", "purple", "pink", "white", "grey", "brown", "beige", "black", "greyscale" |
orientation |
string | optional | Photo orientation.: "all", "vertical", "horizontal", "square" |
people |
string | optional | Toggle photos with people: "all", "with", "without" |
safesearch |
string | optional | Exclude restricted content: "off", "on" |
region |
string | optional | Filter by region: "africa", "asia", "caribbean", "central_america", "eastern_europe", "middle_east", "north_america", "oceania", "south_america", "western_europe" |
order_by |
string | optional | Sort by newest content: "created_at" |
Create
Create a new Collection
Example request:
curl -X POST \
"https://sandbox.api.jumpstory.com/v1/collection" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"name":"Winter","resources":{"photos":["1,2"],"icons":["3,4"],"illustrations":["5,6"],"vectors":["9"],"videos":["7,8"]}}'
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/collection"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Winter",
"resources": {
"photos": [
"1,2"
],
"icons": [
"3,4"
],
"illustrations": [
"5,6"
],
"vectors": [
"9"
],
"videos": [
"7,8"
]
}
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://sandbox.api.jumpstory.com/v1/collection',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'name' => 'Winter',
'resources' => [
'photos' => [
'1,2',
],
'icons' => [
'3,4',
],
'illustrations' => [
'5,6',
],
'vectors' => [
'9',
],
'videos' => [
'7,8',
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/collection'
payload = {
"name": "Winter",
"resources": {
"photos": [
"1,2"
],
"icons": [
"3,4"
],
"illustrations": [
"5,6"
],
"vectors": [
"9"
],
"videos": [
"7,8"
]
}
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
HTTP Request
POST v1/collection
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name |
string | required | Name of the Collection |
resources |
object | optional | |
resources.photos.* |
array | optional | ids |
resources.icons.* |
array | optional | ids |
resources.illustrations.* |
array | optional | ids |
resources.vectors.* |
array | optional | ids |
resources.videos.* |
array | optional | ids |
Update
Create a new Collection
Example request:
curl -X PUT \
"https://sandbox.api.jumpstory.com/v1/collection/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"name":"Winter","resources":{"photos":["1,2"],"icons":["3,4"],"illustrations":["5,6"],"vectors":["9"],"videos":["7,8"]}}'
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/collection/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"name": "Winter",
"resources": {
"photos": [
"1,2"
],
"icons": [
"3,4"
],
"illustrations": [
"5,6"
],
"vectors": [
"9"
],
"videos": [
"7,8"
]
}
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://sandbox.api.jumpstory.com/v1/collection/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'name' => 'Winter',
'resources' => [
'photos' => [
'1,2',
],
'icons' => [
'3,4',
],
'illustrations' => [
'5,6',
],
'vectors' => [
'9',
],
'videos' => [
'7,8',
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/collection/1'
payload = {
"name": "Winter",
"resources": {
"photos": [
"1,2"
],
"icons": [
"3,4"
],
"illustrations": [
"5,6"
],
"vectors": [
"9"
],
"videos": [
"7,8"
]
}
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
HTTP Request
PUT v1/collection/{collection}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name |
string | required | Name of the Collection |
resources |
object | optional | |
resources.photos.* |
array | optional | ids |
resources.icons.* |
array | optional | ids |
resources.illustrations.* |
array | optional | ids |
resources.vectors.* |
array | optional | ids |
resources.videos.* |
array | optional | ids |
Delete
Example request:
curl -X DELETE \
"https://sandbox.api.jumpstory.com/v1/collection/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/collection/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://sandbox.api.jumpstory.com/v1/collection/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/collection/1'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
HTTP Request
DELETE v1/collection/{collection}
Search
Keyword.
Search our library using keywords.
Example request:
curl -X POST \
"http://jumpstory-api.local/v1/keyword" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"query":"totam","id":"2424171, 123124.","page":6,"size":10,"type":"photos","color":"corrupti","orientation":"et","people":"voluptate","safesearch":"quae","region":"et","width":{"value":1920,"compare":"eq"},"duration":{"value":"10-20","compare":"between"},"order_by":"numquam"}'
const url = new URL(
"http://jumpstory-api.local/v1/keyword"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"query": "totam",
"id": "2424171, 123124.",
"page": 6,
"size": 10,
"type": "photos",
"color": "corrupti",
"orientation": "et",
"people": "voluptate",
"safesearch": "quae",
"region": "et",
"width": {
"value": 1920,
"compare": "eq"
},
"duration": {
"value": "10-20",
"compare": "between"
},
"order_by": "numquam"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://jumpstory-api.local/v1/keyword',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'query' => 'totam',
'id' => '2424171, 123124.',
'page' => 6,
'size' => 10,
'type' => 'photos',
'color' => 'corrupti',
'orientation' => 'et',
'people' => 'voluptate',
'safesearch' => 'quae',
'region' => 'et',
'width' => [
'value' => 1920,
'compare' => 'eq',
],
'duration' => [
'value' => '10-20',
'compare' => 'between',
],
'order_by' => 'numquam',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'http://jumpstory-api.local/v1/keyword'
payload = {
"query": "totam",
"id": "2424171, 123124.",
"page": 6,
"size": 10,
"type": "photos",
"color": "corrupti",
"orientation": "et",
"people": "voluptate",
"safesearch": "quae",
"region": "et",
"width": {
"value": 1920,
"compare": "eq"
},
"duration": {
"value": "10-20",
"compare": "between"
},
"order_by": "numquam"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"images": [
{
"id": 1,
"thumbnail_url": "https:\/\/URL_TO_THUMBNAIL.com",
"width": 4000,
"height": 4000,
"file_size": 4000000,
"file_type": "jpg",
"tags": [
"Human"
],
"orientation": "horizontal",
"type": "photo",
"dpi": 96
}
],
"total": {
"photos": 115,
"videos": 15,
"vectors": 116,
"icons": 24,
"illustrations": 5
},
"related_tags": []
}
Example response (200):
{
"videos": [
{
"id": 1,
"thumbnail_url": "https:\/\/URL_TO_THUMBNAIL.com",
"small_video": "https:\/\/URL_TO_SMALL_VIDEO.com",
"duration": 60,
"width": 4000,
"height": 4000,
"file_size": 4000000,
"title": "video title",
"tags": [
"Human"
],
"orientation": "horizontal",
"type": "video",
"frame_rate": 21.75
}
],
"total": {
"photos": 115,
"videos": 15,
"vectors": 116,
"icons": 24,
"illustrations": 5
},
"related_tags": []
}
HTTP Request
POST v1/keyword
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
query |
string | required | Keywords to search for. |
id |
string | optional | comma separated list of ids to include in the search. |
page |
integer | optional | Pagination |
size |
integer | optional | Number of results per page |
type |
string | optional | Type of assets.: "photos", "illustrations", "videos", "vectors", "icons". |
color |
string | optional | Filter by color: "all", "red", "orange", "yellow", "green", "turquoise", "blue", "purple", "pink", "white", "grey", "brown", "beige", "black", "greyscale" |
orientation |
string | optional | Photo orientation.: "all", "vertical", "horizontal", "square" |
people |
string | optional | Toggle photos with people: "all", "with", "without" |
safesearch |
string | optional | Exclude restricted content: "off", "on" |
region |
string | optional | Filter by region: "africa", "asia", "caribbean", "central_america", "eastern_europe", "middle_east", "north_america", "oceania", "south_america", "western_europe" |
width.value |
integer | optional | The desired width to compare against. |
width.compare |
string | optional | It can be the following: eq, gt, gte, lt, lte. |
duration.value |
string | optional | The desired duration to compare against. |
duration.compare |
string | optional | It can be the following: eq, gt, gte, lt, lte, between. |
order_by |
string | optional | Sort results by: "relevance", "created_at" - By default sorting will be done by relevance |
ID search.
Search our library using ID's.
Example request:
curl -X POST \
"https://sandbox.api.jumpstory.com/v1/id" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"id":"1258455,1354785,2547841","type":"photos","page":5,"size":15,"order_by":"consequatur"}'
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/id"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": "1258455,1354785,2547841",
"type": "photos",
"page": 5,
"size": 15,
"order_by": "consequatur"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://sandbox.api.jumpstory.com/v1/id',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'id' => '1258455,1354785,2547841',
'type' => 'photos',
'page' => 5,
'size' => 15,
'order_by' => 'consequatur',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/id'
payload = {
"id": "1258455,1354785,2547841",
"type": "photos",
"page": 5,
"size": 15,
"order_by": "consequatur"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"images": [
{
"id": 1,
"thumbnail_url": "https:\/\/URL_TO_THUMBNAIL.com",
"width": 4000,
"height": 4000,
"file_size": 4000000,
"file_type": "jpg",
"tags": [
"Human"
],
"orientation": "horizontal",
"type": "photo",
"dpi": 96
}
],
"related_tags": []
}
Example response (200):
{
"videos": [
{
"id": 1,
"thumbnail_url": "https:\/\/URL_TO_THUMBNAIL.com",
"small_video": "https:\/\/URL_TO_SMALL_VIDEO.com",
"duration": 60,
"width": 4000,
"height": 4000,
"file_size": 4000000,
"title": "video title",
"tags": [
"Human"
],
"orientation": "horizontal",
"type": "video",
"frame_rate": 21.75
}
],
"related_tags": []
}
HTTP Request
POST v1/id
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
id |
string | required | Search by ID or batch of ID's. |
type |
string | required | Type of assets.: "photos", "illustrations", "videos", "vectors", "icons". |
page |
integer | optional | Pagination |
size |
integer | optional | Number of results per page |
order_by |
string | optional | Sort results by: "relevance", "created_at" - By default sorting will be done by relevance |
TextMatch.
Search for images matching the text provided.
Example request:
curl -X POST \
"https://sandbox.api.jumpstory.com/v1/text-match" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"text":"molestias","page":11,"size":19,"type":"photos"}'
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/text-match"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"text": "molestias",
"page": 11,
"size": 19,
"type": "photos"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://sandbox.api.jumpstory.com/v1/text-match',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'text' => 'molestias',
'page' => 11,
'size' => 19,
'type' => 'photos',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/text-match'
payload = {
"text": "molestias",
"page": 11,
"size": 19,
"type": "photos"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"images": [
{
"id": 1,
"thumbnail_url": "https:\/\/URL_TO_THUMBNAIL.com",
"width": 4000,
"height": 4000,
"file_size": 4000000,
"file_type": "jpg",
"tags": [
"Human"
],
"orientation": "horizontal",
"type": "photo",
"dpi": 96
}
]
}
Example response (200):
{
"videos": [
{
"id": 1,
"thumbnail_url": "https:\/\/URL_TO_THUMBNAIL.com",
"small_video": "https:\/\/URL_TO_SMALL_VIDEO.com",
"duration": 60,
"width": 4000,
"height": 4000,
"file_size": 4000000,
"title": "video title",
"tags": [
"Human"
],
"orientation": "horizontal",
"type": "video"
}
]
}
HTTP Request
POST v1/text-match
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
text |
string | required | Text section. |
page |
integer | optional | Pagination |
size |
integer | optional | Number of results per page |
type |
string | optional | Type of assets.: "photos", "illustrations", "videos", "vectors", "icons". |
Download.
Provides an URL to download selected media.
Example request:
curl -X POST \
"https://sandbox.api.jumpstory.com/v1/download" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"id":19,"type":"photo","height":13,"width":11,"optimize":true}'
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/download"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"id": 19,
"type": "photo",
"height": 13,
"width": 11,
"optimize": true
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://sandbox.api.jumpstory.com/v1/download',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'id' => 19,
'type' => 'photo',
'height' => 13,
'width' => 11,
'optimize' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/download'
payload = {
"id": 19,
"type": "photo",
"height": 13,
"width": 11,
"optimize": true
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"image": "https:\/\/URL_TO_IMAGE_THAT_WILL_EXPIRE_SOON.com"
}
HTTP Request
POST v1/download
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
id |
integer | required | ID of media returned by keyword or textmatch search. |
type |
string | optional | Type of media. Defaults to "photo". |
height |
integer | optional | Define a height to get a scaled version. |
width |
integer | optional | Define a width to get a scaled version. Defaults to 1600 |
optimize |
boolean | optional | Optimize filesize. |
Tools
Optimize image.
This endpoint can optimize the filesize of any given jpg/png/gif image. Quality and transparency intact.
Example request:
curl -X POST \
"https://sandbox.api.jumpstory.com/v1/optimize-image" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"image_url":"PUBLIC_URL_TO_IMAGE"}'
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/optimize-image"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"image_url": "PUBLIC_URL_TO_IMAGE"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://sandbox.api.jumpstory.com/v1/optimize-image',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => [
'image_url' => 'PUBLIC_URL_TO_IMAGE',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/optimize-image'
payload = {
"image_url": "PUBLIC_URL_TO_IMAGE"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"image": "https:\/\/URL_TO_IMAGE_THAT_WILL_EXPIRE_SOON.com"
}
HTTP Request
POST v1/optimize-image
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
image_url |
string | required | Public URL to the image to be optimized. |
User
List Users.
Lists all active users.
Example request:
curl -X GET \
-G "https://sandbox.api.jumpstory.com/v1/user" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/user"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://sandbox.api.jumpstory.com/v1/user',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/user'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
[
{
"id": 1,
"metadata": {},
"created_at": "2020-02-27 21:01:14"
}
]
HTTP Request
GET v1/user
Create user.
This endpoint is using the Partnership Secret Key as Bearer.
Example request:
curl -X POST \
"https://sandbox.api.jumpstory.com/v1/user" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"user_id":"ax11-123ss-11","metadata":{}}'
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/user"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"user_id": "ax11-123ss-11",
"metadata": {}
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://sandbox.api.jumpstory.com/v1/user',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
$o = [
clone (\Symfony\Component\VarExporter\Internal\Registry::$prototypes['stdClass'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('stdClass')),
],
null,
[],
[
'user_id' => 'ax11-123ss-11',
'metadata' => $o[0],
],
[]
),
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/user'
payload = {
"user_id": "ax11-123ss-11",
"metadata": {}
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"token": "JWT_COMPATIBLE_TOKEN",
"expire_seconds": 900
}
HTTP Request
POST v1/user
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
user_id |
string | required | Your internal user_id for reference. |
metadata |
object | optional | Misc. data/information related to the user. |
Update user.
Example request:
curl -X PUT \
"https://sandbox.api.jumpstory.com/v1/user/ax11-123ss-11" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{"metadata":{}}'
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/user/ax11-123ss-11"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
let body = {
"metadata": {}
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://sandbox.api.jumpstory.com/v1/user/ax11-123ss-11',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
'json' => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
$o = [
clone (\Symfony\Component\VarExporter\Internal\Registry::$prototypes['stdClass'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('stdClass')),
],
null,
[],
[
'metadata' => $o[0],
],
[]
),
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/user/ax11-123ss-11'
payload = {
"metadata": {}
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
HTTP Request
PUT v1/user/{id}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | Your internal user id. |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
metadata |
object | optional | Misc. data related to the user. |
Delete user.
Example request:
curl -X DELETE \
"https://sandbox.api.jumpstory.com/v1/user/ax11-123ss-11" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/user/ax11-123ss-11"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://sandbox.api.jumpstory.com/v1/user/ax11-123ss-11',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/user/ax11-123ss-11'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (200):
{
"deleted": true
}
HTTP Request
DELETE v1/user/{id}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | Your internal user id. |
Token.
Issue a new access token.
Example request:
curl -X POST \
"https://sandbox.api.jumpstory.com/v1/user/est/token" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://sandbox.api.jumpstory.com/v1/user/est/token"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://sandbox.api.jumpstory.com/v1/user/est/token',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://sandbox.api.jumpstory.com/v1/user/est/token'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers)
response.json()
Example response (200):
{
"token": "JWT_COMPATIBLE_TOKEN",
"expire_seconds": 900
}
HTTP Request
POST v1/user/{id}/token
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | Your internal user id. |