Skip to content

Latest commit

 

History

History
570 lines (406 loc) · 9.6 KB

API.adoc

File metadata and controls

570 lines (406 loc) · 9.6 KB

ARCH API

Overview

Version information

Version : 2.0.0

URI scheme

Host : localhost:12341
BasePath : /
Schemes : HTTP

Tags

  • api : General API

  • api/job : Jobs API

Resources

Api

General API

List available jobs

GET /api/available-jobs
Description

List all available jobs, grouped by category

Parameters
Type Name Description Schema

Header

X-API-KEY
required

An API key that’s authorized to act on behalf of X-API-USER

string

Header

X-API-USER
required

The user for which this request is being made

string

Responses
HTTP Code Description Schema

200

The list of available jobs grouped by category

Consumes
  • nothing

Produces
  • application/json

Run a job

POST /api/runjob/{jobid}
Description

Runs a job on a specified collection of input files.

Parameters
Type Name Description Schema

Header

X-API-KEY
required

An API key that’s authorized to act on behalf of X-API-USER

string

Header

X-API-USER
required

The user for which this request is being made

string

Path

jobid
required

The UUID of the job type

string

Query

sample
optional

Whether to process only a sample of the input records

boolean

Body

inputSpec
required

The job files input specification

Body

params
optional

Any job-specific parameters

string

Responses
HTTP Code Description Schema

200

The initial job state

Consumes
  • application/json

Produces
  • application/json

Api/job

Jobs API

Download a job output file

GET /api/job/{uuid}/download/{file}
Parameters
Type Name Description Schema

Header

X-API-KEY
required

An API key that’s authorized to act on behalf of X-API-USER

string

Header

X-API-USER
required

The user for which this request is being made

string

Path

file
required

The job output filename

string

Path

uuid
required

The job run UUID

string

Responses
HTTP Code Description Schema

200

The file contents

string

Consumes
  • nothing

Produces
  • application/x-gzip-compressed

List the job’s generated output files

GET /api/job/{uuid}/files
Parameters
Type Name Description Schema

Header

X-API-KEY
required

An API key that’s authorized to act on behalf of X-API-USER

string

Header

X-API-USER
required

The user for which this request is being made

string

Path

uuid
required

The job run UUID

string

Responses
HTTP Code Description Schema

200

The list of output files

< DatasetFile > array

Consumes
  • nothing

Produces
  • application/json

Download a job output file preview

GET /api/job/{uuid}/preview/{file}
Parameters
Type Name Description Schema

Header

X-API-KEY
required

An API key that’s authorized to act on behalf of X-API-USER

string

Header

X-API-USER
required

The user for which this request is being made

string

Path

file
required

The job output filename

string

Path

uuid
required

The job run UUID

string

Responses
HTTP Code Description Schema

200

The preview contents

string

Consumes
  • nothing

Produces
  • application/x-gzip-compressed

Get the job’s WASAPI output listing

GET /api/job/{uuid}/result
Parameters
Type Name Description Schema

Header

X-API-KEY
required

An API key that’s authorized to act on behalf of X-API-USER

string

Header

X-API-USER
required

The user for which this request is being made

string

Path

uuid
required

The job run UUID

string

Responses
HTTP Code Description Schema

200

The WASAPI result listing

Consumes
  • nothing

Produces
  • application/json

Download a job’s sample visualization data

GET /api/job/{uuid}/sample_viz_data
Parameters
Type Name Description Schema

Header

X-API-KEY
required

An API key that’s authorized to act on behalf of X-API-USER

string

Header

X-API-USER
required

The user for which this request is being made

string

Path

uuid
required

The job run UUID

string

Responses
HTTP Code Description Schema

200

The sample visualization data

Consumes
  • nothing

Produces
  • application/json

Get a job’s state

GET /api/job/{uuid}/state
Description

Get the state of a specific job run

Parameters
Type Name Description Schema

Header

X-API-KEY
required

An API key that’s authorized to act on behalf of X-API-USER

string

Header

X-API-USER
required

The user for which this request is being made

string

Path

uuid
required

The job run UUID

string

Responses
HTTP Code Description Schema

200

The job state

Consumes
  • nothing

Produces
  • application/json

Definitions

AvailableJob

Name Description Schema

codeUrl
required

A link to the job source code

string

description
required

string

infoUrl
required

A link to information about the job

string

internal
required

Whether the job is internal/non-user-facing use only

boolean

name
required

string

publishable
required

Whether the job output is publishable to archive.org

boolean

uuid
required

Unique job type identifier

string

AvailableJobsCategory

Name Schema

categoryDescription
required

string

categoryName
required

string

jobs
required

< AvailableJob > array

DatasetFile

Name Schema

accessToken
required

string

creationTime
required

string

fileType
required

string

filename
required

string

lineCount
required

integer (int64)

md5Checksum
optional

string

mimeType
required

string

sizeBytes
required

integer (int64)

InputSpec

Name Schema

collectionId
optional

string

inputType
optional

string

specs
optional

< InputSpec > array

type
required

string

uuid
optional

string

JobState

Name Schema

activeStage
required

string

activeState
required

string

failed
required

boolean

finished
required

boolean

finishedTime
optional

string

id
required

string

name
required

string

queue
optional

string

queuePos
optional

integer (int32)

sample
required

integer (int32)

startTime
optional

string

started
required

boolean

state
required

string

uuid
required

string

Object

SampleVizData

Name Schema

edges
optional

nodes
required

Tuple2[String, String]

Name Schema

_1
required

_2
required

WasapiResponse

Name Schema

count
required

integer (int32)

files
required

< WasapiResponseFile > array

next
optional

string

previous
optional

string

WasapiResponseFile

Name Schema

checksums
required

< string > array

collection
optional

string

filename
required

string

filetype
required

string

locations
required

< string > array

size
required

integer (int64)