Lyve Cloud Account API version 2
Overview
The Lyve Cloud Account API provides programmatic access to Lyve Cloud to perform administrative tasks. You can use the APIs to manage permissions, service accounts, and usage. These APIs are accessed after successful authentication by calling an endpoint that uses secret credentials. Every active Lyve Cloud account administrator can generate one set of account API credentials.
The Account API expects each admin user to generate unique credentials using the Lyve Cloud console to authenticate. For more information on generating the API credentials, see Using Account API.
Protocol basics
Data structure
The API uses JSON structures, which may include the following data types:
Boolean – True or false
Number – Numeric value, For example, 1234
String – Characters enclosed in quotes, For example, "Lyve Cloud"
API endpoint
An endpoint is the URL of the entry point for a Lyve Cloud web service.
https://api.lyvecloud.seagate.com/v2
CRUD operations
The following methods can be used to Create, Read, Update and Delete Lyve Cloud entities:
Operation | Syntax | Body Structure | Response Structure |
---|---|---|---|
Create an entity | POST /uri | Required | The created entity |
Read an entity | GET /uri/<id> | - | The requested entity |
Read all entities | GET /uri | - | List of entities |
Update an entity | PUT /uri/<id> | Required | The updated entity |
Delete an entity | DELETE /uri/<id> | - | The deleted entity |
Response to request
Successful request
The successful status message is 200 (OK); for some API request calls, a successful response contains the JSON format. The details of the JSON format are explained in the respective API request.
Failed request
When an error occurs, the header information contains the following:
Content-Type: application/JSON
An appropriate 4xx or 5xx HTTP status code
The following sample error response shows the structure of response elements common to all REST error responses.
{ "code": "string", "message": "string" }
The following table explains the REST error response elements.
Name | Description |
---|---|
Code | A string that identifies the error. It is meant to be read and understood by programs that detect and handle errors by type. |
Message | A description of the error condition. Programs may display the message directly to the end user if they meet an error condition. An error message in the body aids in resolving the issue. |
List of API error codes
During an error, you will receive a JSON object in the response body containing the information about the error. Error responses also include an error message in the body to assist in resolving the problem.
Code | HTTP Status Code | Message |
---|---|---|
| Bad Request(400) | Token expired. |
| Bad Request(400) | Token is not valid. |
| Bad Request (400) | Invalid time range. |
| Bad Request (400) | This error might occur for the following reasons:
|
| Bad Request (400) | A bucket that keeps audit logs must be set with Object Immutability. |
| Forbidden (403) | Authentication failed. |
| Forbidden (403) | The account has no services enabled for it. |
| Not Found (404) | A permission was not found. |
| Not Found (404) | A service account was not found. |
| Not Found (404) | The service account has expired. Couldn’t enable the expired service. |
| Not Found (404) | The service account has expired. Couldn’t disable the expired service. |
| Not Found (404) | A bucket was not found. |
| Conflict (409) | The permission is still being processed by some regions. |
| Conflict (409) | The service account is still being processed by some regions. |
| Conflict (409) | The permission name is already in use. Please use a different name. |
| Conflict (409) | The service account name is already in use. Please use a different name. |
| Service Unavailable (503) | The server is not ready to handle the request. Please retry the request later. |
| Internal Server Error (500) | The server encountered an internal error. Please retry the request. |