Web API

content

GET /contents/{id}

Retrieves content from the repository

  • Description:

  • Produces: [‘text/html’, ‘application/json’]

Parameters

Name

Position

Description

Type

id

path

ID of content to return

string

Responses

200 - successful operation

404 - Content not found

GET /contents/{id}.html

Retrieves content from the repository as HTML

  • Description:

  • Produces: [‘text/html’]

Parameters

Name

Position

Description

Type

id

path

ID of content to return

string

Responses

200 - successful operation

404 - Content not found

GET /contents/{id}/{filename}.html

Retrieves content from the repository as HTML

  • Description:

  • Produces: [‘text/html’]

Parameters

Name

Position

Description

Type

id

path

ID of content to return

string

filename

path

Optional filename for the content

string

Responses

200 - successful operation

404 - Content not found

GET /contents/{id}.json

Retrieves content from the repository

  • Description:

  • Produces: [‘application/json’]

Parameters

Name

Position

Description

Type

id

path

ID of content to return

string

Responses

200 - successful operation

404 - Content not found

GET /contents/{id}/{filename}.json

Retrieves content from the repository

  • Description:

  • Produces: [‘application/json’]

Parameters

Name

Position

Description

Type

id

path

ID of content to return

string

filename

path

Optional filename for the content

string

Responses

200 - successful operation

404 - Content not found

GET /extras/{id}

Retrieves extra information asociated with the content

  • Description:

  • Produces: [‘application/json’]

Parameters

Name

Position

Description

Type

id

path

ID of content to return

string

Responses

200 - successful operation

Name

Description

Type

isLatest

boolean

downloads

array

state

string

canPublish

array

books

array

404 - Content not found

GET /search/{id}

Search the repository for content

  • Description:

  • Produces: [‘application/json’]

Parameters

Name

Position

Description

Type

id

path

ID of content to search within

string

Responses

200 - successful operation

GET /content/{id}

Retrieves content from the repository

  • Description:

Parameters

Name

Position

Description

Type

id

path

legacy ID for content

string

Responses

200 - successful operation

404 - Not found

GET /content/{id}/{ver}

Retrieves content from the repository

  • Description:

Parameters

Name

Position

Description

Type

id

path

legacy ID for content

string

ver

path

legacy version for content

string

Responses

200 - successful operation

404 - Not found

GET /content/{id}/{ver}/{filename}

Retrieves a file from the repository

  • Description:

Parameters

Name

Position

Description

Type

id

path

legacy ID for content

string

ver

path

legacy version for content

string

filename

path

Optional filename for the content

string

Responses

200 - successful operation

404 - Not found

resource

GET /resources/{id}

Retrieves file resources

  • Description:

  • Produces: [‘application/octet-stream’]

Parameters

Name

Position

Description

Type

id

path

ID of the resource (aka SHA)

string

Responses

200 - successful operation

400 - Invalid ID supplied

404 - Resource not found

GET /resources/{id}/{filename}

Retrieves file resources

  • Description:

  • Produces: [‘application/octet-stream’]

Parameters

Name

Position

Description

Type

id

path

ID of the resource (aka SHA)

string

filename

path

optional filename of the resource

string

Responses

200 - successful operation

400 - Invalid ID supplied

404 - Resource not found

export

GET /exports/{id}.{type}

Retrieves a content export file for the requested type

  • Description:

  • Produces: [‘application/octet-stream’]

Parameters

Name

Position

Description

Type

id

path

ID of content to return

string

type

path

The export file type

string

Responses

200 - successful operation

404 - Resource not found

GET /exports/{id}.{type}/{filename}

Retrieves a content export file for the requested type

  • Description:

  • Produces: [‘application/octet-stream’]

Parameters

Name

Position

Description

Type

id

path

ID of content to return

string

type

path

The export file type

string

filename

path

Optional filename for the content

string

Responses

200 - successful operation

404 - Resource not found

system

GET /ping

Verifies that press server is running

  • Description:

  • Produces: [‘text/plain’]

Responses

200 - successful operation

GET /api/ping

Verifies that press server is running

  • Description:

  • Produces: [‘text/plain’]

Responses

200 - successful operation

GET /api/auth-ping

Verifies that authenticaton succeeds

  • Description:

  • Produces: [‘text/plain’, ‘application/json’]

Responses

200 - successful operation

401 - requires authentication

GET /api/publish-ping

Verifies that authenticated user has publish permission

  • Description:

  • Produces: [‘text/plain’, ‘application/json’]

Responses

200 - successful operation

401 - requires permission to publish

GET /extras

Retrieves extra information about the repository of content

  • Description:

  • Produces: [‘application/json’]

Responses

200 - successful operation

Name

Description

Type

featuredLinks

array

messages

array

licenses

array

subjects

array

redirect

convenience

GET /contents/{id}.html

Retrieves content from the repository as HTML

  • Description:

  • Produces: [‘text/html’]

Parameters

Name

Position

Description

Type

id

path

ID of content to return

string

Responses

200 - successful operation

404 - Content not found

GET /contents/{id}/{filename}.html

Retrieves content from the repository as HTML

  • Description:

  • Produces: [‘text/html’]

Parameters

Name

Position

Description

Type

id

path

ID of content to return

string

filename

path

Optional filename for the content

string

Responses

200 - successful operation

404 - Content not found

GET /contents/{id}.json

Retrieves content from the repository

  • Description:

  • Produces: [‘application/json’]

Parameters

Name

Position

Description

Type

id

path

ID of content to return

string

Responses

200 - successful operation

404 - Content not found

GET /contents/{id}/{filename}.json

Retrieves content from the repository

  • Description:

  • Produces: [‘application/json’]

Parameters

Name

Position

Description

Type

id

path

ID of content to return

string

filename

path

Optional filename for the content

string

Responses

200 - successful operation

404 - Content not found

GET /resources/{id}/{filename}

Retrieves file resources

  • Description:

  • Produces: [‘application/octet-stream’]

Parameters

Name

Position

Description

Type

id

path

ID of the resource (aka SHA)

string

filename

path

optional filename of the resource

string

Responses

200 - successful operation

400 - Invalid ID supplied

404 - Resource not found

GET /exports/{id}.{type}/{filename}

Retrieves a content export file for the requested type

  • Description:

  • Produces: [‘application/octet-stream’]

Parameters

Name

Position

Description

Type

id

path

ID of content to return

string

type

path

The export file type

string

filename

path

Optional filename for the content

string

Responses

200 - successful operation

404 - Resource not found