IdCloud REST API

Basic principles

  • The Scenario REST API is a simple generic API to perform various scenarios in IdCloud.

  • Each use-case is represented as Scenario Resource in the server.

    • It is possible to provide inputs to the scenario
    • It is possible to read results (even partial) of the scenario
    • It is possible to control the life cycle of particular scenario
  • The Scenario Resource can be manipulated by standard HTTP methods

    • HTTP POST - New scenario created
    • HTTP GET - Scenario detail obtained
    • HTTP PATCH - Scenario is updated with new inputs

Scenario resource

object
id
string

Unique scenario identification

1 validation
name
string

Scenario name. Type of operation to perform with IdCloud

status
object

Current scenario status

  • Running

    • Scenario is still running.
  • Waiting

    • Scenario is waiting for additional inputs.
  • Finished

    • Final state
    • Scenario finished with no errors and result is available for clients to decide if successful.
  • Success

    • Final state
    • Scenario finished with success.
  • Failed

    • Final state
    • Scenario finished with logical failure such as invalid inputs and so on.
  • Error

    • Final state
    • Scenario finished with critical error(s)
      • Typically Thales must be involved for troubleshooting.

Note: The final state is specific for each scenario definition. For some scenarios Success/Failed/Error state makes sense; for others only Finished/Error makes sense.

state
object

Container of current scenario state information

Scenario resource example

{
  "id": "3b96121c-7f73-11e8-adc0-fa7ae01bbebc",
  "name": "Dummy Scenario",
  "status": "Running",   
  "state": {
     
    "steps": [
      {
        "id": "SecondStepOfTheScenario",
        "name": "Second Step of the scenario",
        "status": "Running",
        "category": "Service Task",
        "description": "Some description of the step",
      }
    ],
 
    "result": {
      "code": "0",
      "message": "OK",
      "object": {
         "someField" : "someValue"
      },
      "type": "dummyResult",
       
      "step": {
        "id": "FirstStepOfTheScenario",
        "name": "First step of the scenario",
        "category": "Service Task",
        "description": "Some description of the step"
      }
    }
  }
}