Users

Upon creation of a user a root user is generated. This user can add further users to a user and manage their permissions.

User Object

A user object is made up of properties that include:

Properties

  • Name
    name
    Type
    string
    Description

    The name of the user.

  • Name
    uuid
    Type
    string
    Description

    Unique identifier for the user.

  • Name
    current_branch
    Type
    string
    Description

    The current branch uuid.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the user was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    Timestamp of when the user was last updated.


GET/v1/user/:id

Retrieve User

This endpoint allows you to retrieve a user for a given uuid.

Request

GET
/v1/user/8728d713-f6ce-44dc-b54e-8fb44baadf17
curl -G https://api.stellify.com/v1/user/8728d713-f6ce-44dc-b54e-8fb44baadf17 \
  -H "Authorization: Bearer {token}"


import ApiClient from '@stellisoft/js-api-client'

const client = new ApiClient(token)

await client.user.get('8728d713-f6ce-44dc-b54e-8fb44baadf17')
from stellify_api import ApiClient

client = ApiClient(token)

client.user.get('8728d713-f6ce-44dc-b54e-8fb44baadf17')
$client = new \Stellify\ApiClient($token);

$client->user->get('8728d713-f6ce-44dc-b54e-8fb44baadf17');

Response

{
    "uuid": "8728d713-f6ce-44dc-b54e-8fb44baadf17",
    "name": "Matt Anderson"
}

POST/v1/user

Create User

This endpoint allows you to create a new user.

Request

POST
/v1/user
curl https://api.stellify.com/v1/user \
  -H "Authorization: Bearer {token}"
import ApiClient from '@stellisoft/js-api-client'

const client = new ApiClient(token)

await client.user.create()
from stellify_api import ApiClient

client = ApiClient(token)

client.user.create()
$client = new \Stellify\ApiClient($token);

$client->user->create();

Response

{
    "uuid": "8728d713-f6ce-44dc-b54e-8fb44baadf17",
    "name": "Matt Anderson"
}

PATCH/v1/user/:id

Update User

This endpoint allows you to perform a partial update to a user.

Elective attributes

  • Name
    name
    Type
    string
    Description

    The user's name.

  • Name
    current_branch
    Type
    string
    Description

    A valid branch uuid.

Request

PUT
/v1/user/8728d713-f6ce-44dc-b54e-8fb44baadf17
curl -X PUT https://api.stellify.com/v1/user/8728d713-f6ce-44dc-b54e-8fb44baadf17 \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d name="My New User"
import ApiClient from '@stellisoft/js-api-client'

const client = new ApiClient(token)

await client.user.update('8728d713-f6ce-44dc-b54e-8fb44baadf17', {
    "name": "My New User",
});
from stellify_api import ApiClient

client = ApiClient(token)

client.user.update("8728d713-f6ce-44dc-b54e-8fb44baadf17", name="My New User")
$client = new \Stellify\ApiClient($token);

$client->user->update('8728d713-f6ce-44dc-b54e-8fb44baadf17, [
      "name" => "My New User",
]);

Response

{
    "uuid": "8728d713-f6ce-44dc-b54e-8fb44baadf17",
    "name": "My New User",
    "current_branch": "766aef05-d46f-495f-b00d-372ff8760597"
}

DELETE/v1/user/:id

Delete User

This endpoint allows you to delete a user and any attached directories and branches.

Request

DELETE
/v1/user/8728d713-f6ce-44dc-b54e-8fb44baadf17
curl -X DELETE https://api.stellify.com/v1/user/8728d713-f6ce-44dc-b54e-8fb44baadf17 \
  -H "Authorization: Bearer {token}"
import ApiClient from '@stellisoft/js-api-client'

const client = new ApiClient(token)

await client.messages.delete('8728d713-f6ce-44dc-b54e-8fb44baadf17')
from stellify_api import ApiClient

client = ApiClient(token)

client.user.delete("8728d713-f6ce-44dc-b54e-8fb44baadf17")
$client = new \Stellify\ApiClient($token);

$client->user->delete('8728d713-f6ce-44dc-b54e-8fb44baadf17');

Please be aware that our API documentation is under construction.