Stream API


 

Sigmify Stream API Document V0.1

API Connectivity :

Sigmify exposes services via HTTPS on port 443. Clients must support SSLv2 with HIGH strength

cipher suites as defined by the current general release version of the Apache HTTP Server*.
Clients should have an up-to-date CA Certificate registry supporting the “VeriSign Class 3
Secure Server CA – G3” signing certificate.

*http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslciphersuite

Encoding :

API requests and responses are encoded objects using the Javascript Object Notation (JSON) syntax. Requests must include a valid JSON MIME type “content type” HTTP Header. JSON responses will always include the ‘application/json’ content-type.

Acceptable JSON MIME Types for HTTP Content-Type:

  • application/json
  • application/x-javascript
  • text/javascript
  • text/x-javascript
  • text/x-json
  • text/json

 

Note:

  1. Objects with no properties may be denoted in JSON array syntax.
  2. Unless otherwise stated, null properties may be indicated with a JSON null or simply omitted.
  3. JSON Object properties may appear in any order.
  4. JSON examples in this document are often formatted for visibility, but in practice should contain minimum whitespace.
  5. Unless otherwise stated, all properties and values are case sensitive.
  6. If the HTTP request headers indicate compliance, the response body may optionally be gzip or deflate encoded.
  7. The encoding will be indicated in the “ContentEncoding” response header. All requests should be encoded in Unicode UTF-8. Responses will be presented in Unicode UTF-8.

 

Authentication for Webservices :

Authentication token is expected with each API request. Client needs to call getAuthToken service to get a valid token which can then be used in subsequent requests. Token will expire after 30 minutes.

Every subsequent request needs to pass the token with attribute name “authToken”.

Login request requires user and password parameters passed using HTTP POST method.

Example:

Request: https://www.sigmify.com/getAuthToken?user=jDoe@xyz.com&;password=pwd

Response:

{

“message”: “OK”,

“token”: “0b02008c-1a1c-46a0-a980-05f76b2a66ea”,

“userCode”: “jDoe@xyz.com”;,

“firstName”: “John”,

“lastName”: “Doe”

}

Error Response:

{

“message”: “Password is incorrect”,

“userCode”: “jDoe@xyz.com”;

}

Client should make no more than 3 attempts to retry a failed authentication.

Webservices for updating Sigmify Stream

After getting the token using the getAuthToken service, the sigmify stream can be updated using updateSigmifyStream API call.

This is a post service.The token generated is sent as a parameter to this post and the data to be updated is sent as a plain JSON string.

Example:

Request:

https://www.sigmify.com/updateSigmifyStream?authToken=<generated token>

JSON format:

{

“origin”: “External”,

“tenantId”: “XDFCGF”,

“processName”: “Leave Process”,

“processCode”: “CD001”,

“tranxNo”: “TR00000001”,

“messageId”: “MID000000001”,

“messageStatus”: “P”,

“messageDate”: “2015-03-14 15:20:36+05:30”,

“documentName”: “Approve Leaave”,

“docCode”: “DC00AT002”,

“docCodePrev”: ” DC00AT001″,

“docNo”: “DN00001002”,

“docNoPrev”: ” DN00001001″,

“subject1”: “employee name”,

“subject2”: “2015-03-01 “,

“subject3”: “Going out of station”,

“subject4”: “10 Days”,

“subject5”: “Approved by Supervisor”,

“link”: “http://www.abc.com/process/openNexDocument?id=”,

“attachmentExists”: “N”,

“attachmentUrl”: “http://www.abc.com/process/attachment?id=”,

” assignedToRoles”: “RoleCode1,RoleCode2″,

” assignedToUsers”: “user_code1, user_code2,user_code3”,

“completedBy”: “user_code1”,

“completedDate”: “2015-03-16 15:20:36”

}

Response:

{

“status”: “OK”,

“remarks”: “successfully updated”

}

Error Response:

{

“status”: “FAILED”,

“remarks”: “unable to update record”

}

Explanation of the JSON properties :

PropertyDescriptionMandatory
OriginWill always be ‘External’ when called from a third party. The Unique ID allocated for your organization.Yes
tenantIdThe unique ID allocated by Sigmify to your organisation. This is allocated at the time of registration.Yes
processNameName of the process of which the data is being fed into the Sigmify stream.Yes
processCodeCode of the process No
tranxNoA unique identifier for the transaction of the said process.Yes
messageIdAn Id to uniquely identity the current message.Yes
messageStatusStatus of the message – P:Pending / D:CompletedYes
messageDateDate of the messageYes
documentNameName of the document whose data is being fed.Yes
docCodeID(if any) of the document whose data is being fed.No
docCodePrevID(if any) of the document preceding the current document.No
docNoUnique number allocated to the instance of the document (if any).No
docNoPrevUnique number allocated to the instance of the previous document (if any).No
subject1Data field that needs to be displayed in the Sigmify stream on the placeholder1 Yes
subject2Data field that needs to be displayed in the Sigmify stream on the placeholder2Yes
Subject3Data field that needs to be displayed in the Sigmify stream on the placeholder3No
Subject4Data field that needs to be displayed in the Sigmify stream on the placeholder4No
Subject5Data field that needs to be displayed in the Sigmify stream on the placeholder5No
LinkURL to open the document from the sigmify stream. If case of a document that is to be opened in read only
mode, please construct the URL accordingly and pass. If the URL is not passed, the link will not be enabled on the
sigmify steam.
No
attachmentExistsIs there an attachment that needs to be show along with the document details on the Sigmify stream?
Possible values – Y/N
No
attachmentUrlIf yes, then URL for that attachment. Mandatory if attachmentExists is YNo
assignedToRoles*The users belonging to these roles in Sigmify will be able to see this message/document details on their stream.
One of assignedToRole or assignedToUsers needs to have values.
Yes/No
assignedToUsers*These users will be able to see this message/document details on their stream. One of assignedToRole or assignedToUsers needs to have valuesYes/No
Completedby*The Code of the user who has performed/completed the current document. Mandatory when the messageStatus is DYes/No
completedDateThe date/time when the current document was completed/task was performed. Mandatory when the messageStatus is DYes/No

*The third party will need to send the user and roles that are valid in Sigmify.