Skip to content

authentic.network API documentation v2.4.0

Documentation for the REST api access of authentic.api


Content

Add Binary Content

Back to top

Endpoint allows the storage binary data such as images, PDF's etc. for use within items and groups.

POST /api/v2/contents

Headers - Header

Name Type Description
content-type String

Request content type

Parameters examples

json - Request-Example:

{
  "content-type": "image/png",
  "data": "Base64-String",
  "name": "",
  "description": ""
}

Success response example

Success response example - Success-Response:

{ "id": "id", "path": "path", "url": "Url for direct download / access" }

Error response

Error response - Errors

Name Type Description
400

Bad Request - The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, size too large, invalid request message framing, or deceptive request routing).

403

Forbidden - The request contained valid data and was understood by the server, but the server is refusing action. This may be due to the user not having the necessary permissions for a resource or needing an account of some sort, or attempting a prohibited action (e.g. creating a duplicate record where only one is allowed). This code is also typically used if the request provided authentication via the an-api-token header field, but the server did not accept that authentication. The request should not be repeated.

500

Internal server error - A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

Delete Binary Content

Back to top

Remove binary content object.

DELETE /api/v2/contents/:id

Headers - Header

Name Type Description
content-type String

Request content type

Parameters examples

json - Request-Example:

{
  "content-type": "image/png",
  "data": "Base64-String",
  "description": ""
}

Success response example

Success response example - Response:

HTTP/1.1 200 OK

Error response

Error response - Errors

Name Type Description
403

Forbidden - The request contained valid data and was understood by the server, but the server is refusing action. This may be due to the user not having the necessary permissions for a resource or needing an account of some sort, or attempting a prohibited action (e.g. creating a duplicate record where only one is allowed). This code is also typically used if the request provided authentication via the an-api-token header field, but the server did not accept that authentication. The request should not be repeated.

404

NotFound - The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.

500

Internal server error - A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

Get Binary Content List

Back to top

Return binary content (like Images, PDF's etc) for use within items and groups as list. List is sorted by _created timestamp and by default limited to 25 entries.

GET /api/v2/contents

Headers - Header

Name Type Description
content-type String

Request content type

Parameters - Parameter

Name Type Description
timestamp Number

Only scans that are older than the specified time stamp. If not set, the result starts with the most recent.

limit Number

Number of expected entries

Success response example

Success response example - Success-Response:

[
 {
   "id": "id",
   "data": {
     "url": "url",
     "content-type": "application/pdf",
     "path": path,
     "_owner": "owner"
   }
 }
]

Error response

Error response - Errors

Name Type Description
403

Forbidden - The request contained valid data and was understood by the server, but the server is refusing action. This may be due to the user not having the necessary permissions for a resource or needing an account of some sort, or attempting a prohibited action (e.g. creating a duplicate record where only one is allowed). This code is also typically used if the request provided authentication via the an-api-token header field, but the server did not accept that authentication. The request should not be repeated.

500

Internal server error - A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

Read Binary Content

Back to top

Return binary content (like Images, PDF's etc) for use within items and groups.

GET /api/v2/contents/:id

Headers - Header

Name Type Description
content-type String

Request content type

Parameters - Parameter

Name Type Description
id String

The content id

Success response example

Success response example - Success-Response:

HTTP/2 200 
content-type: application/pdf
content-length: 202433

Error response

Error response - Errors

Name Type Description
404

NotFound - The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.

500

Internal server error - A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

Scale Image

Back to top

Return scaled image. If the requested ID is not an image, a 400 error is returned.

GET /api/v2/contents/:id/:width

Parameters - Parameter

Name Type Description
id String

The content id

width String

Target width after down scaling

quality Number

Comressionrate for jpeg images, default is 80

Success response example

Success response example - Success-Response:

HTTP/2 200 
content-type: image/png
content-length: 202433

Error response

Error response - Errors

Name Type Description
400

Bad Request - The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, size too large, invalid request message framing, or deceptive request routing).

404

NotFound - The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.

500

Internal server error - A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.