Enqueue a scoring job
POST
/api/v1/packages/score
const url = 'https://api.pkgplease.com/api/v1/packages/score';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","version":"example","priority":0}'};
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.pkgplease.com/api/v1/packages/score \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "version": "example", "priority": 0 }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
version
required
string
priority
number
Responses
Section titled “Responses”Job enqueued
Media typeapplication/json
object
jobId
string
Examplegenerated
{ "jobId": "example"}Missing name or version
Media typeapplication/json
object
error
required
string
Examplegenerated
{ "error": "example"}