Cube

Cube

Permission Properties

HTTP REQUEST: GET

GET/api/1.0/org/{orgId}/permissions/project/{projectId}/cube
URI PARAMETERS
NameTypeDescription
orgIdstringThe Organization ID (UUID) for which you are querying.
projectIdstringThe Project ID for which you are querying
RESPONSES
CodeDescription
200Success.
200 Response Body
{
  "response": {
    "designtime_permissions": [
      {
        "name": "cube.read",
        "id": "cube.read"
      },
      {
        "name": "cube.update",
        "id": "cube.update"
      },
      {
        "name": "cube.delete",
        "id": "cube.delete"
      }
    ],
    "runtime_permissions": [
      {
        "name": "cube.query",
        "id": "cube.query"
      },
      {
        "name": "cube.ctas",
        "id": "cube.ctas"
      }
    ]
  },
  "status": {
    "i18n_message": "response.ok",
    "message": "OK"
  }
}

Permissions

HTTP REQUEST: GET

GET/api/1.0/org/{orgId}/permissions/project/{projectId}/cube/{cubeId}
URI PARAMETERS
NameTypeDescription
orgIdstringThe Organization ID (UUID) for which you are querying.
projectIdstringThe Project ID for which you are querying
cubeIdstringThe Cube ID for which you are querying
RESPONSES
CodeDescription
200Success.
401This error will occur if calling user does not have access right for the API.
404This error will occur if calling user does not have access right for the API.
500A server error occurred. Check the logs for more details.
503This error will occur if Design Center APIs are not enabled.
200 Response Body
{
  "response": {
    "designtime_permissions": {
      "designtime_permission_matrix": {
        "568a4ab9-f7a4-4ac2-5162-9a496453d161": [
          "cube.read",
          "cube.update",
          "cube.delete"
        ],
        "admin1234": [
          "cube.read",
          "cube.update",
          "cube.delete"
        ],
        "f1edfca6-7f8a-4a4d-7952-4660580c67a2": [
          "cube.read",
          "cube.update",
          "cube.delete"
        ]
      },
      "permissions": [
        {
          "name": "cube.read",
          "id": "cube.read"
        },
        {
          "name": "cube.update",
          "id": "cube.update"
        },
        {
          "name": "cube.delete",
          "id": "cube.delete"
        }
      ],
      "users": [
        {
          "user_id": "admin1234",
          "auth_username": "admin",
          "name": "admin user",
          "super_user": true,
          "api_super_user": true,
          "email": "admin@atscale.com"
        },
        {
          "user_id": "568a4ab9-f7a4-4ac2-5162-9a496453d161",
          "auth_username": "gaurav1",
          "name": "gaurav",
          "super_user": false,
          "api_super_user": false,
          "email": "gaurav1@gaurav.com"
        },
        {
          "user_id": "f1edfca6-7f8a-4a4d-7952-4660580c67a2",
          "auth_username": "gauravshetti4",
          "name": "gaurav",
          "super_user": false,
          "api_super_user": false,
          "email": "gauravshetti4@gmail.com"
        }
      ]
    },
    "object_properties": {
      "exclusive_access": false,
      "author_user_id": "admin1234",
      "object_type": "cube",
      "object_id": "default.58e262f8-3ec6-4835-4890-60e8ab51e76b.3eac167c-6dfd-4487-5876-38a039618e82"
    },
    "runtime_permissions": {
      "permissions": [
        {
          "name": "cube.query",
          "id": "cube.query"
        },
        {
          "name": "cube.ctas",
          "id": "cube.ctas"
        }
      ],
      "user_permission_matrix": {
        "568a4ab9-f7a4-4ac2-5162-9a496453d161": [
          "cube.query",
          "cube.ctas"
        ],
        "admin1234": [
          "cube.query",
          "cube.ctas"
        ],
        "f1edfca6-7f8a-4a4d-7952-4660580c67a2": [
          "cube.query",
          "cube.ctas"
        ]
      },
      "users": [
        {
          "user_id": "admin1234",
          "auth_username": "admin",
          "name": "admin user",
          "super_user": true,
          "api_super_user": true,
          "email": "admin@atscale.com"
        },
        {
          "user_id": "568a4ab9-f7a4-4ac2-5162-9a496453d161",
          "auth_username": "gaurav1",
          "name": "gaurav",
          "super_user": false,
          "api_super_user": false,
          "email": "gaurav1@gaurav.com"
        },
        {
          "user_id": "f1edfca6-7f8a-4a4d-7952-4660580c67a2",
          "auth_username": "gauravshetti4",
          "name": "gaurav",
          "super_user": false,
          "api_super_user": false,
          "email": "gauravshetti4@gmail.com"
        }
      ]
    },
    "admins": [
      "admin1234"
    ]
  },
  "status": {
    "i18n_message": "response.ok",
    "message": "OK"
  }
}

HTTP REQUEST: POST

POST/api/1.0/org/{orgId}/permissions/project/{projectId}/cube/{cubeId}
URI PARAMETERS
NameTypeDescription
orgIdstringThe Organization ID (UUID) for which you are querying.
projectIdstringThe Project ID for which you are querying
cubeIdstringThe Cube ID for which you are querying
RESPONSES
CodeDescription
200Success.
401This error will occur if calling user does not have access right for the API.
404This error will occur if calling user does not have access right for the API.
500A server error occurred. Check the logs for more details.
503This error will occur if Design Center APIs are not enabled.
Request Body
{
  "designtime_permission_matrix": {
    "b9f64bf0-a599-49fb-7ddd-0dc0a73f86c0": [
      "cube.read",
      "cube.update",
      "cube.delete"
    ]
  },
  "runtime_user_permission_matrix": {
    "42ee6ae8-8884-4fd3-7275-a950cda0de71": [
      "cube.query",
      "cube.ctas"
    ],
    "b9f64bf0-a599-49fb-7ddd-0dc0a73f86c0": [
      "cube.query",
      "cube.ctas"
    ],
    "c3a4d0a1-b78f-47c9-5612-c7d085c098ac": [
      "cube.ctas"
    ]
  },
  "exclusive_access_run_time": false,
  "exclusive_access_design_time": false
}
200 Response Body
{
  "response": "Succesfully updated the permissions",
  "status": {
    "i18n_message": "response.ok",
    "message": "OK"
  }
}

Create

HTTP REQUEST: POST

Create a new Cube by specifying the Organization ID and Project ID where it should be added.

POST/api/1.0/org/{orgId}/project/{projectId}/cube/create
URI PARAMETERS
NameTypeDescription
orgIdstringID of the organization where you want to create a cube
projectIdstringID of the project where you want to create a cube
QUERY PARAMETERS
NameTypeDescription
namestringName for the new cube
descriptionstringDescription for the new cube
inclusive-accessstringtrue / false
RESPONSES
CodeDescription
200Success.
401This error will occur if calling user does not have access right for the API.
404This error will occur if the org identified by orgId does not exist.
500A server error occurred. Check the logs for more details.
Request Body
{
  "name": "My new cube",
  "description": "My new cube created via API call",
  "inclusive-access": "true"
}
200 Response Body
{
  "status": {
    "i18n_message": "response.ok",
    "message": "OK"
  },
  "response": {
    "id": "a97bf0d8-e04a-4336-4fdc-ed1fda53f949",
    "name": "My new cube",
    "properties": {
      "description": "My new cube created via API call",
      "caption": "My new Cube",
      "visible": true
    }
  }
}

Copy

HTTP REQUEST: POST

Copy an existing Cube by specifying its ID, and the corresponding Organization ID and Project ID.

POST/api/1.0/org/{orgId}/project/{projectId}/cube/{cubeId}/copy
URI PARAMETERS
NameTypeDescription
orgIdstringThe Organization ID of the cube you want to copy
projectIdstringThe Project ID of the cube you want to copy
cubeIdstringID of the cube you want to copy
QUERY PARAMETERS
NameTypeDescription
namestringName for the copied cube
descriptionstringDescription for the copied cube
inclusive-accessstringtrue / false
copy-securitybooleantrue / false
RESPONSES
CodeDescription
200Success.
401This error will occur if calling user does not have access right for the API.
404This error will occur if the org identified by orgId does not exist.
500A server error occurred. Check the logs for more details.
Request Body
{
  "name": "My new cube - copy",
  "description": "Copy of My new cube, to be used for testing",
  "inclusive-access": "true",
  "copy-security": false
}
200 Response Body
{
  "status": {
    "i18n_message": "response.ok",
    "message": "OK"
  },
  "response": {
    "id": "fa7e1978-2333-4eda-5d15-c22059cb98e6",
    "name": "My new cube - copy",
    "properties": {
      "description": "Copy of My new cube, to be used for testing",
      "caption": "My new cube - copy",
      "visible": true
    },
    "attributes": {},
    "dimensions": {},
    "actions": {
      "properties": {
        "include-default-drill-through": true
      }
    },
    "data-sets": {
      "data-set-ref": [
        {
          "uiid": "ca79f3c4-b16d-4aa6-67e6-5c12ef3117ed",
          "id": "bd58eed7-ef4f-416f-6d06-0ee463263072",
          "properties": {
            "allow-aggregates": true,
            "create-hinted-aggregate": false,
            "aggregate-destinations": null
          },
          "logical": {
            "key-ref": [
              {
                "id": "1f63a7d7-b86d-4965-96b3-b4d998726a73",
                "unique": false,
                "complete": "false",
                "column": [
                  "customerkey"
                ]
              }
            ]
          }
        }
      ]
    },
    "calculated-members": {},
    "aggregates": {}
  }
}

Update & Delete

To update or delete a cube, you need to perform these calls with a user that has sufficient permissions on organization, project, and cube level. For details, see the main AtScale documentation: Managing AtScale > Managing User Access and Security > Granting Design-Time and Runtime Permissions on Cubes to Individual Users.

HTTP REQUEST: PATCH

Change the name and description an existing Cube by specifying its ID, and the corresponding Organization ID and Project ID.

PATCH/api/1.0/org/{orgId}/project/{projectId}/cube/{cubeId}
URI PARAMETERS
NameTypeDescription
orgIdstringThe Organization ID for which you want to update a cube
projectIdstringThe Project ID for which you want to update a cube
cubeIdstringID of the cube you want to update
QUERY PARAMETERS
NameTypeDescription
namestringNew name of the specified cube
descriptionstringNew description of the specified cube
RESPONSES
CodeDescription
200Success.
401This error will occur if calling user does not have access right for the API.
404This error will occur if the org identified by orgId does not exist.
500A server error occurred. Check the logs for more details.
Request Body
{
  "name": "New name for my Cube",
  "description": "New description for my Cube"
}
200 Response Body
{
  "status": {
    "i18n_message": "response.ok",
    "message": "OK"
  },
  "response": "a97bf0d8-e04a-4336-4fdc-ed1fda53f949"
}

HTTP REQUEST: DELETE

Remove an existing Cube by specifying its ID, and the corresponding Organization ID and Project ID.

DELETE/api/1.0/org/{orgId}/project/{projectId}/cube/{cubeId}
URI PARAMETERS
NameTypeDescription
orgIdstringThe Organization ID for which you want to remove a cube
projectIdstringThe Project ID for which you want to remove a cube
cubeIdstringID of the cube you want to remove
RESPONSES
CodeDescription
200Success.
401This error will occur if calling user does not have access right for the API.
404This error will occur if the org identified by orgId does not exist.
500A server error occurred. Check the logs for more details.
200 Response Body
{
  "status": {
    "i18n_message": "response.ok",
    "message": "OK"
  },
  "response": "fa7e1978-2333-4eda-5d15-c22059cb98e6"
}