artifacts

Prepare

POST
Creates an artifact and generates an upload URL for its data.

Request

This endpoint expects an object.
file_name
stringRequired
The name of the file that's being uploaded.
file_type
stringOptional
The type of file that's being uploaded.

Response

This endpoint returns an object
form_data
list of objects
The POST policy form data.
id
string
The generated artifact's ID.
url
string
The URL that the file's data should be uploaded to.
POST
1curl -X POST https://api.devrev.ai/artifacts.prepare \
2 -H "Authorization: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "file_name": "file_name"
6}'
200Successful
1{
2 "form_data": [
3 {
4 "key": "key",
5 "value": "value"
6 }
7 ],
8 "id": "ARTIFACT-12345",
9 "url": "url"
10}