Creating Embedded Analytics
Function
This API is used to create embedded analytics.
URI
POST /v1/{project_id}/embeddings
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For how to obtain the project ID, see Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Obtain a user token by calling IAM's "Obtaining a User Token" API. X-Subject-Token in the response header is the desired user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
No |
String |
Embedded analytics ID. If specified, the ID that is passed in is used. Or, a new ID will be generated. |
name |
Yes |
String |
Embedded analytics name. |
resource_type |
Yes |
String |
Explanation Enumerated value of the resource type, which is used to specify the type of the authorized object. For example, datasource indicates that the type of the authorized object is a data source. Constraints N/A Value range The enumerated values are:
Default value N/A |
resource_id |
Yes |
String |
Resource ID corresponding to the embedded analytics, for example, the ID of the dashboard or large screen. |
root_resource_id |
Yes |
String |
Root resource ID corresponding to the embedded analytics, which is the root resource ID of the dashboard or large screen. |
auth_type |
No |
String |
Access type of the embedded analytics. 0 indicates login access, and 1 indicates ticket authentication. The default value is 0. |
config |
No |
String |
Configuration parameter of the embedded analytics. For example, ticket=xxxx indicates the ticket value in the embedded analytics link. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
id |
String |
ID of the created embedded analytics. |
Example Request
Create embedded analytics.
POST https://{endpoint}/v1/{project_id}/embeddings { "id" : "6cb08a50xxxxxxxxxxxxxxxxxxxxxx", "name": "New Embedded Analytics", "resource_type" : "dashboard", "resource_id" : "866a519fxxxxxxxxxxxxxxxx", "root_resource_id" : "866a519fxxxxxxxxxxxxxxxx", "config" : "ticket=ec85f874axxxxxxxxxxxxxxxxxxxxxxxxxxxx", "auth_type" : 1 }
Example Response
Status code: 200
The embedded analytics is created.
{ "id": "6cb08a50xxxxxxxxxxxxxxxxxxxxxxx", }
Status Codes
Status Code |
Description |
---|---|
200 |
The embedded analytics is created. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot