API - Full event details
The callback URL receives event information including errors in its URL parameters. For some events you may require more details. You can use the API to obtain full details per each event.
For example, use the API to obtain the full list of translated files created. This action is notified by event type "CreatedTranslatedFiles".
URL
To get a specific event in the project you are logged in:
(GET)/api/actions/action?token=&id=
To get a specific event in any project. You need to connect to the Beebox using the admin credentials:
(GET)/api/server/actions/action?token=&id=
PARAMETERS
 id | The event id is included with push URLs and when enumerating all events. If the event does not exist an error message is returned. |
RESULTS
The method returns full details of the event including the list of processed files. Example:
{ "id": 1002 "details": { "files":[ {"date":"2015-01-20T08:48:21.2142634+00:00","type":"S","locale":"en", "spath":"c:\\beebox\\7372c828-320d-4ddf-9522-593414bd8b73\\in\\product1.json", "tpath":null,"err":null,"errex":null }, {"date":"2015-01-20T08:48:21.2563038+00:00","type":"T","locale":"es", "spath":"c:\\beebox\\7372c828-320d-4ddf-9522-593414bd8b73\\in\\product2.json", "tpath":"c:\\beebox\\7372c828-320d-4ddf-9522-593414bd8b73\\out\\es\\pro duct2","err":null,"errex":null } ]} Â ... }
The resulting json is:
Property | Description |
---|---|
id | The unique id of the event. |
date | Date of event. |
projectkey | Beebox project to which this event refers to. |
projectname | Beebox project name. |
action | User friendly description of the action. |
actioncode | A code identifying the type of event. This corresponds to the "bbid" parameter when using callbacks. |
info | May contain additional information on the action. User friendly text. |
sender | The role of the initiator. |
success | Boolean. True if the operation succeeded. False if it failed. |
error | If the operation failed, this field contains a short error description. |
details | Additional and event specific json details. For example the events of type "CreatedTranslatedFiles" and "SourceFileParsed" include the complete list of source or target files processed. The property is always null if the API URL parameter "fulldetails" is false. |
pushurl | If the Beebox project is configured to notify an external system of an event (push notification), then this is the URL that was called (or will be called). |
pushresult | Indicates the status of the push notification. Possible values are: • Waiting: The push was not yet done but will be within very shortly. • Skip: This event does not need to be pushed. • Done: Push done. • Failed: The URL could not be opened. If you see this kind of error please double check if the URL is valid and the Beebox server has the right to access the URL. |
emailadminresult | If administrator email notifications are enabled in the Beebox project of this event, then this property indicates whether the email is already sent out or not. Emails can be configured in the "Emailnotifications" tab of the project settings page. The values are "Waiting" (email not yetsent), "Skip" (no email to send or emails disabled), "Done" (email sent) and "Failed" (email could not be sent). Administrator emails are sent for all event types. |
The "details" property has this structure:
Property | Description |
---|---|
date | Date when the file was processed. UTC and ISO formatted. |
type | "S" if the operation refers to the analysis of a source file (text extraction). "T" if the operation refers to the creation of the translated file. |
locale | If type is "S" then this is the source language. Otherwise it is a target language. |
spath | The full path of the source file |
tpath | The full path of the translated file. Applies only if "type" is "T". |
err | Optional text. Null if the operation succeeded. Otherwise a short error message. |
errex | Optional text. If the operation failed, this property contains verbose and technical error details. |
REMARKS
When your URL is called it includes parameter "bbid" which is the related event ID. You can now connect to the API and retrieve the full event details. Please note that the login may occasionally time out due to running Beebox server operations. In fact automatic operations start immediately after the Beebox has opened the callback URLs. If you receive a timeout, please wait a few seconds and then try again.
EXAMPLE
See this page for an example:
Event Details - Created Translated Files
Copyright Wordbee - Buzzin' Outside the Box since 2008