Users

Gets a users within the organization.

get
Authorizations
Responses
200

OK

application/json
get
GET /organization/v1/users HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Accept: */*
[
  {
    "created_by": "text",
    "created_on": 1,
    "email": "text",
    "first_name": "text",
    "id": "text",
    "invited": true,
    "is_active": true,
    "is_deleted": true,
    "last_name": "text",
    "mfa_enabled": true,
    "org": {
      "created_by": "text",
      "created_on": 1,
      "current_owner": "text",
      "id": "text",
      "is_active": true,
      "is_deleted": true,
      "name": "text",
      "tier": "text",
      "updated_by": "text",
      "updated_on": 1
    },
    "org_id": "text",
    "roles": [
      "text"
    ],
    "updated_by": "text",
    "updated_on": 1
  }
]

Enable user MFA

post
Authorizations
Responses
204

No Content

No content

post
POST /organization/v1/users/mfa HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Accept: */*

No content

Deletes user MFA Registration

delete
Authorizations
Responses
204

No Content

No content

delete
DELETE /organization/v1/users/mfa HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Accept: */*

No content

Gets a user by user id within the organization.

get
Authorizations
Path parameters
user_idstringRequired

User identifier

Responses
200

OK

application/json
get
GET /organization/v1/users/{user_id} HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Accept: */*
200

OK

{
  "created_by": "text",
  "created_on": 1,
  "email": "text",
  "first_name": "text",
  "id": "text",
  "invited": true,
  "is_active": true,
  "is_deleted": true,
  "last_name": "text",
  "mfa_enabled": true,
  "org": {
    "created_by": "text",
    "created_on": 1,
    "current_owner": "text",
    "id": "text",
    "is_active": true,
    "is_deleted": true,
    "name": "text",
    "tier": "text",
    "updated_by": "text",
    "updated_on": 1
  },
  "org_id": "text",
  "roles": [
    "text"
  ],
  "updated_by": "text",
  "updated_on": 1
}

Update a user by user id within the organization.

patch
Authorizations
Path parameters
user_idstringRequired

User identifier

Body
activatebooleanOptional
first_namestringOptional
last_namestringOptional
Responses
200

OK

No content

patch
PATCH /organization/v1/users/{user_id} HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 56

{
  "activate": true,
  "first_name": "text",
  "last_name": "text"
}

No content

Gets all api keys for a user

get
Authorizations
Path parameters
user_idstringRequired

User identifier

Responses
200

OK

application/json
get
GET /organization/v1/users/{user_id}/api-keys HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "api_key": "text",
    "created_by": "text",
    "created_date": 1,
    "is_active": true,
    "key_id": "text",
    "label": "text",
    "updated_by": "text",
    "updated_date": 1
  }
]

Creates a new api key

post
Authorizations
Path parameters
user_idstringRequired

User identifier

Body
labelstringOptional
Responses
201

Created

No content

post
POST /organization/v1/users/{user_id}/api-keys HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "label": "text"
}
201

Created

No content

Gets key for a user by key id

get
Authorizations
Path parameters
user_idstringRequired

User identifier

key_idstringRequired

Key identifier

Responses
200

OK

application/json
get
GET /organization/v1/users/{user_id}/api-keys/{key_id} HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Accept: */*
200

OK

{
  "api_key": "text",
  "created_by": "text",
  "created_date": 1,
  "is_active": true,
  "key_id": "text",
  "label": "text",
  "updated_by": "text",
  "updated_date": 1
}

Delete key for a user by key id

delete
Authorizations
Path parameters
user_idstringRequired

User identifier

key_idstringRequired

Key identifier

Responses
204

No Content

No content

delete
DELETE /organization/v1/users/{user_id}/api-keys/{key_id} HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Accept: */*
204

No Content

No content

Update key for a user by key id

patch
Authorizations
Path parameters
user_idstringRequired

User identifier

key_idstringRequired

Key identifier

Responses
204

No Content

No content

patch
PATCH /organization/v1/users/{user_id}/api-keys/{key_id} HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Accept: */*
204

No Content

No content

Detaches RBAC role(s) to user by its user id within the organization.

delete
Authorizations
Path parameters
user_idstringRequired

User identifier

Body
rolesstring[]Optional
Responses
200

OK

No content

delete
DELETE /organization/v1/users/{user_id}/roles HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "roles": [
    "text"
  ]
}

No content

Attaches RBAC role(s) to user by its user id within the organization.

patch
Authorizations
Path parameters
user_idstringRequired

User identifier

Body
rolesstring[]Optional
Responses
200

OK

No content

patch
PATCH /organization/v1/users/{user_id}/roles HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "roles": [
    "text"
  ]
}

No content

Was this helpful?