Tenants

Get Client

Gets a Client.

GET /api/v1/tenants/clients/{clientId}

Headers

Header Description
Authorization Bearer your portal access token
Content-Type application/json

Url Segments

Segment Description
clientId The client id to get.

Response : 200 (OK)

{
  "tenantId": "B205B3EC-A9D7-4243-B88C-017533957DEB",
  "clientId": "hubster.portal.api.B205B3ECA9D74243B88C017533957DEB",
  "name": "Hubster Portal API Client (Public)",
  "enabled": true,
  "allowedScopes": [
    "hubster-portal-api"
  ],
  "claims": [
    {
      "type": "role",
      "value": "admin"
    },
    {
      "type": "tenant",
      "value": "B205B3EC-A9D7-4243-B88C-017533957DEB"
    }
  ],
  "secrets": [
    {
      "id": 9,
      "name": "my secret 1",
      "token": "SMWvD7WUAn8bkdl..."
    },
    {
      "id": 15,
      "name": "my secret 2",
      "token": "SMWvD7WUAn8bkdl..."
    },
    {
      "id": 16,
      "name": "my secret 3",
      "token": "SMWvD7WUAn8bkdl...",
      "expiration": "2030-01-31T00:00:00"
    }
  ]
}
HTTP Status Description
200 OK response. The body of the response will include the data requested.
401 Unauthorized. Token is invalid.
403 Forbidden. Access to the requested resource is forbidden.
404 Not found. Resource not found.
408 Timed out. The request timed out.
429 Too many requests. API usage limit has been reached.
500 Internal server error. There was an internal issue with the service.
503 Service unavailable. The service is unavailable.

Add Client Token

Adds a new Client Token.

POST /api/v1/tenants/clients/{clientId}/tokens

Headers

Header Description
Authorization Bearer your portal access token
Content-Type application/json

Url Segments

Segment Description
clientId The client id affected.

Request Properties

Property Mandatory Description
name Yes Unique tenant name for Hub.
expiration No Expiration date when this token will no longer be valid. If no expiration date was provide, then this token lives forever.

Example Request Body

{
  "name": "my secret 3",
  "expiration": "2030-01-31T00:00:00"
}

Response : 200 (OK)

{
  "id": 16,
  "name": "my secret 3",
  "token": "7AQNCUKAXdCg1M...",
  "expiration": "2030-01-31T00:00:00"
}
HTTP Status Description
200 OK response. The body of the response will include the data requested.
400 Bad request. The body of the response will have more info.
401 Unauthorized. Token is invalid.
403 Forbidden. Access to the requested resource is forbidden.
408 Timed out. The request timed out.
429 Too many requests. API usage limit has been reached.
500 Internal server error. There was an internal issue with the service.
503 Service unavailable. The service is unavailable.

Delete Client Token

Deletes (revokes) a Client Token.

DELETE /api/v1/tenants/clients/{clientId}/tokens/{tokenId}

Headers

Header Description
Authorization Bearer your portal access token
Content-Type application/json

Url Segments

Segment Description
clientId The client id affected.
tokenId The the token id to delete.

Response : 200 (OK)

HTTP Status Description
200 OK response. The body of the response will include the data requested.
401 Unauthorized. Token is invalid.
403 Forbidden. Access to the requested resource is forbidden.
408 Timed out. The request timed out.
429 Too many requests. API usage limit has been reached.
500 Internal server error. There was an internal issue with the service.
503 Service unavailable. The service is unavailable.