Artifacts

Prepare Artifacts

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

POST
/artifacts.prepare
AuthorizationBearer <token>

All the DevRev APIs require a token to authenticate the user. Provide Authorization: Bearer <TOKEN> as a header to every API request. How do I find my token?

In: header

configuration_set?artifact-configuration-set

Represents a set of configuration to be used with the artifacts object.

Value in"article_media" | "default" | "email_media" | "job_data" | "marketplace_listing_icon" | "marketplace_media" | "org_logo" | "plug_setting" | "plug_setting_banner_card" | "portal_css" | "snap_in_functions_code" | "snap_widget" | "user_profile_picture" | "work"
file_namestring

The name of the file that's being uploaded.

Formattext
file_type?string

The type of file that's being uploaded.

Formattext

Response Body

curl -X POST "https://api.devrev.ai/artifacts.prepare" \  -H "Content-Type: application/json" \  -d '{    "file_name": "string"  }'
{
  "form_data": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "id": "ARTIFACT-12345",
  "url": "string"
}
{
  "detail": "string",
  "message": "string",
  "type": "artifact_already_attached_to_a_parent",
  "existing_parent": "string",
  "is_same": true
}
{
  "detail": "string",
  "message": "string",
  "type": "unauthenticated"
}
{
  "detail": "string",
  "message": "string",
  "type": "forbidden"
}
{
  "detail": "string",
  "message": "string",
  "type": "too_many_requests",
  "retry_after": 0
}
{
  "detail": "string",
  "message": "string",
  "type": "internal_error",
  "reference_id": "string"
}
{
  "detail": "string",
  "message": "string",
  "type": "service_unavailable"
}