Sprinto Developer API

Add evidence for workflow check

Use the following API template to seamlessly upload evidence for a workflow check you've configured on your Sprinto account.

🚧

The Sprinto Developer API is in beta

  • Endpoints may change as we add more functionality.

Getting UUID of Workflow Check

To upload evidence for a workflow check, you'll need the Universal Unique Identifier (UUID) of the respective workflow check. Use the query below to retrieve UUIDs of activated workflow checks from your account.

Enter a integer value for argument first to define the number of responses for the query through the Sprinto API Playground variable section.

query WorkflowChecksPaginated($first: Int) {
  workflowChecksPaginated(first: Int) {
    totalCount
    edges {
      node {
        pk
        title
      }
      cursor
    }
  }
}
{
  "data": {
    "workflowChecksPaginated": {
      "totalCount": 107,
      "edges": [
        {
          "node": {
            "pk": "dasdfadfsdsfsdfvcssdfvsC",   // This is a dummy value
            "title": "Performance Evaluations"
          },
          "cursor": "E48QH8ESAIJFNOAINCOMDFSD"          // This is a dummy value
        },
        {
          "node": {
            "pk": "dsfSCsdfcsaXcsdfcsdcc",      // This is a dummy value
            "title": "Periodic review of the users having access to  trello"
          },
          "cursor": "dfsfdsf90w3rejdiwefioaDFC"        // This is a dummy value
        }
      ]
    }
  }
}

Try yourself: United States: Europe: India

The above example query starts with operation type WorkflowChecksPaginated that defines the API call to retrieve workflow check details. The argument first is assigned with argument type Int.

For response, the fieldpk, and title is used to retrieve the UUID and title of the workflow checks from your account. Copy the pk id of your desired workflow check from the query response.

If you don't find your relevant workflow check listed in the previous response, you can browse the next list of workflow checks using the arguments after along with cursor. You need to provide the cursor of the last workflow check from the previous query.

Below is the list of response codes you can get from the server:

Response codeStatusMessageReason
200Success
401UnauthorizedInvalid or expired API token.The API key is invalid or disabled.
429Too many requestsThere are too many requests. Please try again after some time.You’ve breached the rate limits for the API. Please refer to rate-limitation.

Uploading evidence for a workflow check

Once you get the UUID for a workflow check from the previous query. Follow the below query to upload evidence for a workflow check.

Enter the valid value for arguments workflowCheckPk you have got from the above query. Also, enter the valid value for arguments evidenceRecordDate and evidenceFile through Variables section over Sprinto API Playground.

mutation UploadWorkflowCheckEvidence($workflowCheckPk: UUID!, $evidenceRecordDate: DateTime!, $evidenceFile: Upload!) {
  uploadWorkflowCheckEvidence(workflowCheckPk: $workflowCheckPk, evidenceRecordDate: $evidenceRecordDate, evidenceFile: $evidenceFile) {
    workflowCheck {
      evidenceStatus
    }
  }
}
{
  "data": {
    "uploadWorkflowCheckEvidence": {
      "message": "Evidence uploaded for this check",
      "workflowCheck": {
        "evidenceStatus": "UPLOAD_COMPLETE"
      }
    }
  }
}

Try yourself: United States: Europe: India

In the above example API call, operation type UploadWorkflowCheckEvidence is used to upload evidence. Arguments workflowCheckPk is assigned with type UUID. You need to enter the valid UUID of the workflow check you want to upload the evidence.

The other two arguments evidenceRecordDate and evidenceFile is assigned with the type DateTime and Upload . You must enter the evidence record date in YYYY-MM-DD format and upload the evidence file from your computer.

Below is the list of response codes and response messages you can get from the server for your executed API call:

Response codeStatusMessageReason
200SuccessEvidence uploaded for this check
200ErrorIncorrect check ID, evidence cannot be uploaded.The workflow check ID doesn't match with any workflow check present in the system. Make sure you are using the correct check ID.
200ErrorThe check is in review, so evidence cannot be uploaded for this checkThe workflow check is currently in review stage. Evidence for this check can be uploaded only after the review of the existing evidence is completed.
200ErrorUnable to upload this file formatThe file format you have uploaded isn't supported. Kindly upload the report in one of the following formats: ‘.doc’, ‘.docx’, ‘.dotx’, ‘.xls’, ‘.xlsx’, ‘.pdf’, ‘.zip’, ‘.tar’, ‘.odt’, or ‘.ods’.
401UnauthorizedInvalid or expired API token.The API key is invalid or disabled.
429Too many requestsThere are too many requests. Please try again after some time.You’ve breached the rate limits for the API. Please refer to rate limitation (United States: Europe: India).