Ally APIs
Ally API (2)
Download OpenAPI specification:Download
Get content information
Return the feedback and/or alternative format information for a previously uploaded content item
Authorizations:
path Parameters
clientId required | integer The numerical Ally identifier |
contentHash required | string Example: Mi4gSGVhZGluZ3NfdGFnZ2VkX2luY29ycmVjdGx5LnBkZjo4NkE3NEJGOTUxRDA2NEM4Qzk1ODUyMDI0NEQ0REJBNkM4RDdGRjJCOmFwcGxpY2F0aW9uL3BkZg The content identifier |
query Parameters
feedback | string Example: feedback=true Whether feedback information should be returned in the response |
formats | string Example: formats=true Whether alternative format information should be returned in the response |
Responses
Response samples
- 200
{- "hash": "Mi4gSGVhZGluZ3NfdGFnZ2VkX2luY29ycmVjdGx5LnBkZjo4NkE3NEJGOTUxRDA2NEM4Qzk1ODUyMDI0NEQ0REJBNkM4RDdGRjJCOmFwcGxpY2F0aW9uL3BkZg",
- "feedback": {
- "visibility": "low",
- "report": {
- "results": {
- "Tagged": {
- "score": 0
}, - "Contrast": {
- "snippets": [
- {
- "page": 0,
- "y0": 63.583138,
- "x0": 588.6369,
- "y1": 385.0053,
- "x1": 612.7333
}, - {
- "page": 1,
- "y0": 63.583138,
- "x0": 688.4769,
- "y1": 473.90308,
- "x1": 712.5733
}
], - "score": 0.9442992157651318
}, - "LanguageCorrect": {
- "detectedLanguage": "nl",
- "score": 0
}
}, - "suggestions": {
- "Tagged": 0.8,
- "Contrast": 0.297,
- "LanguageCorrect": 0.23
}, - "score": 0.2
}
}, - "formats": {
- "availableFormats": [
- "Beeline",
- "Tts",
- "Epub",
- "Translation",
- "Html"
], - "canToggleAvailability": false,
- "available": true,
- "visibility": true
}, - "metadata": {
- "name": "my_test_file.pdf",
- "fileType": "pdf",
- "mimeType": "application/pdf",
- "isVersioned": false
}
}
Upload content for feedback processing
Upload a piece of content for Ally Feedback processing
Authorizations:
path Parameters
clientId required | integer The numerical Ally identifier |
Request Body schema: multipart/form-data
file required | string <binary> |
Responses
Response samples
- 202
{- "hash": "dGVzdC5wZGY6MkQwOTM5M0U4RjMzNUQ5RUIxNDE0QjlGMTlENzAwNzYyQjI1Njk0QjphcHBsaWNhdGlvbi9wZGY=",
- "status": "in_progress",
- "statusUrl": "/api/v2/clients/1/content/dGVzdC5wZGY6MkQwOTM5M0U4RjMzNUQ5RUIxNDE0QjlGMTlENzAwNzYyQjI1Njk0QjphcHBsaWNhdGlvbi9wZGY=/status",
- "resourceUrl": "/api/v2/clients/1/content/dGVzdC5wZGY6MkQwOTM5M0U4RjMzNUQ5RUIxNDE0QjlGMTlENzAwNzYyQjI1Njk0QjphcHBsaWNhdGlvbi9wZGY="
}
Get batched content information
Return the feedback and/or alternative format information for multiple content items
Authorizations:
path Parameters
clientId required | integer The numerical Ally identifier |
query Parameters
feedback | string Example: feedback=true Whether feedback information should be returned in the response |
formats | string Example: formats=true Whether alternative format information should be returned in the response |
Request Body schema: application/json
Array of objects (ContentReference) The non empty list of content references to get the information for | |||
Array
|
Responses
Request samples
- Payload
{- "references": [
- {
- "hash": "Mi4gSGVhZGluZ3NfdGFnZ2VkX2luY29ycmVjdGx5LnBkZjo4NkE3NEJGOTUxRDA2NEM4Qzk1ODUyMDI0NEQ0REJBNkM4RDdGRjJCOmFwcGxpY2F0aW9uL3BkZg"
}
]
}
Response samples
- 200
[- {
- "hash": "Mi4gSGVhZGluZ3NfdGFnZ2VkX2luY29ycmVjdGx5LnBkZjo4NkE3NEJGOTUxRDA2NEM4Qzk1ODUyMDI0NEQ0REJBNkM4RDdGRjJCOmFwcGxpY2F0aW9uL3BkZg",
- "feedback": {
- "visibility": "low",
- "report": {
- "results": {
- "Tagged": {
- "score": 0
}, - "Contrast": {
- "snippets": [
- {
- "page": 0,
- "y0": 63.583138,
- "x0": 588.6369,
- "y1": 385.0053,
- "x1": 612.7333
}, - {
- "page": 1,
- "y0": 63.583138,
- "x0": 688.4769,
- "y1": 473.90308,
- "x1": 712.5733
}
], - "score": 0.9442992157651318
}, - "LanguageCorrect": {
- "detectedLanguage": "nl",
- "score": 0
}
}, - "suggestions": {
- "Tagged": 0.8,
- "Contrast": 0.297,
- "LanguageCorrect": 0.23
}, - "score": 0.2
}
}, - "formats": {
- "availableFormats": [
- "Beeline",
- "Tts",
- "Epub",
- "Translation",
- "Html"
], - "canToggleAvailability": false,
- "available": true,
- "visibility": true
}, - "metadata": {
- "name": "my_test_file.pdf",
- "fileType": "pdf",
- "mimeType": "application/pdf",
- "isVersioned": false
}
}
]
Get content processing status
Return the processing state for a previously uploaded content item. This endpoint can be continuously polled for information
Authorizations:
path Parameters
clientId required | integer The numerical Ally identifier |
contentHash required | string Example: Mi4gSGVhZGluZ3NfdGFnZ2VkX2luY29ycmVjdGx5LnBkZjo4NkE3NEJGOTUxRDA2NEM4Qzk1ODUyMDI0NEQ0REJBNkM4RDdGRjJCOmFwcGxpY2F0aW9uL3BkZg The content identifier |
Responses
Response samples
- 200
{- "hash": "dGVzdC5wZGY6MkQwOTM5M0U4RjMzNUQ5RUIxNDE0QjlGMTlENzAwNzYyQjI1Njk0QjphcHBsaWNhdGlvbi9wZGY=",
- "status": "in_progress",
- "statusUrl": "/api/v2/clients/1/content/dGVzdC5wZGY6MkQwOTM5M0U4RjMzNUQ5RUIxNDE0QjlGMTlENzAwNzYyQjI1Njk0QjphcHBsaWNhdGlvbi9wZGY=/status",
- "resourceUrl": "/api/v2/clients/1/content/dGVzdC5wZGY6MkQwOTM5M0U4RjMzNUQ5RUIxNDE0QjlGMTlENzAwNzYyQjI1Njk0QjphcHBsaWNhdGlvbi9wZGY="
}
Create format for content
Authorizations:
path Parameters
clientId required | integer The numerical Ally identifier |
contentHash required | string Example: Mi4gSGVhZGluZ3NfdGFnZ2VkX2luY29ycmVjdGx5LnBkZjo4NkE3NEJGOTUxRDA2NEM4Qzk1ODUyMDI0NEQ0REJBNkM4RDdGRjJCOmFwcGxpY2F0aW9uL3BkZg The content identifier |
format required | string Example: Pdf, Html, Translation:nl, ... Format identifier |
Request Body schema: application/x-www-form-urlencoded
url required | string The URL from where the original file can be downloaded. This URL needs to carry any required authentication parameters (e.g. signed query string) |
formatParam | string Used for the translation format, can be omitted for all other formats |
Responses
Response samples
- 200
{- "status": "success",
- "statusUrl": "/api/v2/clients/1/content/hash/formats/Beeline/status",
- "downloadUrl": "/api/v2/clients/1/content/hash/formats/Beeline"
}
Download a generated alternative format
Note that the format should've been requested using the POST method previously. The format is generated asynchronously and status can be polled using the /status endpoint.
Authorizations:
path Parameters
clientId required | integer The numerical Ally identifier |
contentHash required | string Example: Mi4gSGVhZGluZ3NfdGFnZ2VkX2luY29ycmVjdGx5LnBkZjo4NkE3NEJGOTUxRDA2NEM4Qzk1ODUyMDI0NEQ0REJBNkM4RDdGRjJCOmFwcGxpY2F0aW9uL3BkZg The content identifier |
format required | string Example: Pdf, Html, Translation:nl, ... Format identifier |
query Parameters
asAttachment | string Example: asAttachment=true Whether the alternative format should be offered with a Content-Disposition header so it can be downloaded as an attachment by browsers |
Responses
Get format generation status
Get the status of the format generation process
Authorizations:
path Parameters
clientId required | integer The numerical Ally identifier |
contentHash required | string Example: Mi4gSGVhZGluZ3NfdGFnZ2VkX2luY29ycmVjdGx5LnBkZjo4NkE3NEJGOTUxRDA2NEM4Qzk1ODUyMDI0NEQ0REJBNkM4RDdGRjJCOmFwcGxpY2F0aW9uL3BkZg The content identifier |
format required | string Example: Pdf, Html, Translation:nl, ... Format identifier |
Responses
Response samples
- 200
{- "status": "success",
- "statusUrl": "/api/v2/clients/1/content/hash/formats/Beeline/status",
- "downloadUrl": "/api/v2/clients/1/content/hash/formats/Beeline"
}