Get Projects media
This is an extension of GET /api/projects
. It returns media data associated with each project you support.
Legend
❓ - clarification will be provided
⚪️ - discontinued
⏳ - TBD
🟡 - supported but requires changes
🟢 - supported
Request
Comparison
Term | Old API | New API |
---|---|---|
Endpoint | 🟢 GET /api/projects-media | 🟡 GET /v1/projects Projects media🟡 GET /v1/projects/{id}/media Specific project media |
Authorization | 🟢 Via a query parameter t (required) | 🟡 Via the Authorization request header (required) |
Examples
curl --request GET \
--url 'https://market-api.southpole.com/api/projects-media?t=token' \
--header 'Content-Type: application/json'
curl --request GET \
--url 'https://dcs-compensate-api-sandbox.southpole.com/v1/projects?pageSize=20¤cy=USD' \
--header 'accept: application/json' \
--header 'authorization: Bearer token'
curl --request GET \
--url "https://dcs-compensate-api-sandbox.southpole.com/v1/projects/1/media" \
--header 'accept: application/json' \
--header 'authorization: Bearer token'
Response
Comparison
Data Model (JSON path) | Old API | New API |
---|---|---|
Status | 🟢 status | ⚪️ Removed in favour of the HTTP client response status field |
Name | 🟢 media[].name | ⚪️ Removed |
Location code | 🟢 media[].location_code | 🟡 projects[].media.images[].url 🟡 projects[].media.videos[].url |
Type (image type) | 🟢 media[].type | ⚪️ Removed |
Dimensions | 🟢 media[].dimensions | 🟡 projects[].media.images[].width 🟡 projects[].media.images[].height |
Project ID | 🟢 media[].project_id | 🟡 projects[].id |
Examples
{
"status": "ok",
"media": [
{
"name": "0758-Za_hung_hydro_1.jpg",
"location_code": "https://a.southpole.com/public/media/300758/0758-Za_hung_hydro_1.jpg",
"type": "image",
"dimensions": "1500x1000",
"project_id": 300758
}
]
}
{
"projects": [
{
"media": {
"images": [
{
"height": 642,
"url": "https://cdn.shopify.com/s/files/1/0622/3862/1853/products/southpole059-02_1920x768_1600x642_61470f5e-439a-4131-b146-c0cc6a4214dc.jpg?v=1674059084",
"width": 1600
}
],
"videos": []
}
}
]
}
{
"images": [
{
"height": 642,
"url": "https://cdn.shopify.com/s/files/1/0622/3862/1853/products/southpole059-02_1920x768_1600x642_ba22b83e-dd86-4c70-b79d-7c31f9e93b27.jpg?v=1674058529",
"width": 1600
}
],
"videos": []
}
Updated almost 2 years ago