list-commitments
restish dci list-commitments [flags]
Returns a list of commitments for the customer. Commitments are listed in reverse chronological order by default.
Flagsβ
--sort-by: (string enum:"name","startDate","endDate","provider","createTime","updateTime")
--sort-order: (string enum:"asc","desc")
--max-results: (string default:"500")
--page-token: (string)
--filter: (string)
Responsesβ
200 (application/json)β
OK - The request succeeded.
{
"type": "object",
"description": "List of commitments.",
"properties": {
"pageToken": {
"type": "string",
"description": "Page token. It is used to request a specific page of the list results.",
"example": "bDl0QkEwVFZxUEwxaUJRaHhTcXM"
},
"rowCount": {
"type": "integer",
"description": "The number of returned records.",
"format": "int64",
"example": 1
},
"commitments": {
"type": "array",
"description": "Array of commitments.",
"items": {
"type": "object",
"description": "Summary information of a commitment in a list.",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the commitment."
},
"name": {
"type": "string",
"description": "The name of the commitment."
},
"startDate": {
"type": "string",
"format": "date-time",
"example": "2024-03-10T23:00:00Z",
"description": "The start date of the commitment."
},
"endDate": {
"type": "string",
"format": "date-time",
"example": "2024-03-10T23:00:00Z",
"description": "The end date of the commitment."
},
"currency": {
"type": "string",
"description": "The currency of the commitment.",
"example": "USD"
},
"cloudProvider": {
"type": "string",
"description": "The cloud provider associated with the commitment.",
"enum": [
"google-cloud",
"amazon-web-services",
"microsoft-azure"
]
},
"totalCommitmentValue": {
"type": "number",
"format": "double",
"description": "The total value of the commitment across all periods."
},
"totalCurrentAttainment": {
"type": "number",
"format": "double",
"description": "The total current spend attainment across all periods."
},
"periods": {
"type": "array",
"description": "The list of commitment periods.",
"items": {
"type": "object",
"description": "A single period within a commitment.",
"properties": {
"startDate": {
"type": "string",
"format": "date-time",
"example": "2024-03-10T23:00:00Z",
"description": "The start date of the period."
},
"endDate": {
"type": "string",
"format": "date-time",
"example": "2024-03-10T23:00:00Z",
"description": "The end date of the period."
},
"commitmentValue": {
"type": "number",
"format": "double",
"description": "The commitment value for this period."
},
"marketplaceLimitPercentage": {
"type": "number",
"format": "double",
"description": "The marketplace limit as a percentage (0-100)."
}
}
}
},
"createTime": {
"type": "integer",
"format": "int64",
"description": "The creation time in milliseconds since epoch."
},
"updateTime": {
"type": "integer",
"format": "int64",
"description": "The last update time in milliseconds since epoch."
}
}
}
}
}
}
400 (application/json)β
Bad Request - The server cannot process the request, often due to a malformed request.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
401 (application/json)β
Unauthorized - Invalid API key.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
403 (application/json)β
Forbidden - The client is not authorized to perform the request.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
500 (application/json)β
Internal Server Error - Something went wrong with the DoiT API server.
{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}
Aliases: list-commitments, listcommitments