Start an extraction-guidance dry run on one document
POST
/api/v1/projects/{projectId}/extraction-guidance/dry-runs
const url = 'https://api.yggy.tech/api/v1/projects/example/extraction-guidance/dry-runs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"documentId":"example","draft":{"purpose":"example","include":["example"],"skip":["example"]}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.yggy.tech/api/v1/projects/example/extraction-guidance/dry-runs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "documentId": "example", "draft": { "purpose": "example", "include": [ "example" ], "skip": [ "example" ] } }'Extracts the first part of the document with the draft guidance and with the saved guidance, without changing the graph. The run costs extraction credits.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” projectId
required
string
Request Body
Section titled “Request Body ” Media type application/json
object
documentId
required
string
draft
required
object
purpose
required
string | null
include
required
Array<string>
skip
required
Array<string>
Example generated
{ "documentId": "example", "draft": { "purpose": "example", "include": [ "example" ], "skip": [ "example" ] }}Responses
Section titled “ Responses ”Dry run queued
Media type application/json
object
id
required
string
Example generated
{ "id": "example"}No credits left, or the document has no text
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Unauthorized
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Forbidden
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Project or document not found
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}A dry run is already running in this project
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}The organization has too many dry runs in progress
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Dry runs are not available right now
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}