Unicat API Reference

Up - API Reference - Home


/dam/p/<project gid>/publish/<storage pathname>

Make an original asset available for download.

Returns the URL you can use to fetch the published asset.

GET Request

GET /dam/p/<project gid>/publish/<storage pathname>
Authorization: Bearer <JWT>

storage pathname is the storage path name to the asset - not related to the path name as used in the assets data.

The current implementation uses a gid-based filename with versioning. As an example, we have an svg file in /vector/example.svg, with gid eddbe3b0-eb6a-4301-9700-c770df127456 and version 31. The pathname will be eddbe3b0-eb6a-4301-9700-c770df127456~31.svg.

Success response

Note: unlike /api calls, a /dam call NEVER refreshes the JWT

{
    "success": true,
    "result": {
        "public_url": "https://unicat.app/media/p-8fdf8601-6ad0-405e-962a-89400ae69a41/src/eddbe3b0-eb6a-4301-9700-c770df127456.svg",
        }
    },
    "data": {}
}

result

public_url use this url to fetch the published asset

Error responses

400 Bad request - missing parameters or wrong type or value
401 Permission denied - missing or expired JWT
403 Forbidden - not a member of this project
422 Unprocessable entity - asset or parent asset doesn't exist