Saltar al contingut principal
POST
/
v1
/
organizations
/
{organization_id}
/
operations
curl --request POST \
  --url https://api.flexxible.net/v1/organizations/{organization_id}/operations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "execute_microservice",
  "target": {
    "type": "workspaces",
    "ids": [
      "507f1f77bcf86cd799439011",
      "507f1f77bcf86cd799439012"
    ]
  },
  "expiration_in_seconds": 600,
  "payload": {
    "microservice_id": "507f1f77bcf86cd799439015",
    "parameters": {
      "mode": "safe"
    }
  }
}
'
{
  "ids": [
    {
      "organization_id": "507f1f77bcf86cd799439011",
      "operation_id": "507f1f77bcf86cd799439031"
    }
  ]
}
{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}
{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}
{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}
{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}
{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}
{
"error": {
"message": "<string>",
"code": "<string>",
"details": "<string>"
}
}

Autoritzacions

Authorization
string
header
requerit

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paràmetres de ruta

organization_id
string
requerit

Identificador únic de l'organització.

Maximum string length: 24
Pattern: ^[0-9a-f]{24}$

Cos

application/json
type
enum<string>
requerit

Tipus de comandament d'operació.

Opcions disponibles:
execute_microservice,
delete_workspaces,
shutdown_workspaces,
restart_workspaces,
suspend_workspaces
target
object
requerit

Objecte d'abast i objectius.

expiration_in_seconds
integer

Expiració personalitzada en segons. Si s'ometeix s'utilitza el valor per defecte del comandament.

Rang requerit: 600 <= x <= 84600
payload
object

Càrrega específica del tipus d'operació. Per a delete_workspaces/shutdown_workspaces/restart_workspaces/suspend_workspaces no es permet càrrega útil.

Resposta

Operacions creades correctament.

ids
object[]
requerit

Identificadors d'operacions creades en el mateix ordre de creació.

Minimum array length: 1