Atoka API User Reference

User Creation

Some section of the api show different results depending on the user that is doing the request. If your application has multiple users, through this endpoint you can register them in our Api, and then send an extra parameter appUserId in each request to get the user-tailored response.

For example the lists API allows the creation of collections of companies which can be shared among users but have a single owner. All of your users will share the same token and will be identified by the appUserId parameter.

Note: if your application has no user, you will be able to use all the services offered by the api without any extra appUserId parameter. You can ignore this section

In order to create a user the Api requires few information: a name that will be displayed in the Api as label for this user, and an appUserId, which is the unique identifier you use inside your application for this user and that you will send in each following Api requests as value for the appUserId parameter.

https://api.atoka.io/v2/app/users/{appUserId}

Replace {appUserId} with user identifier in the third party application.

All requests must be properly authenticated.

Authentication

Parameters
  • token string required

    All requests must be properly authenticated; see the Authentication section for more info

curl -XPOST "https://api.atoka.io/v2/app/users/{appUserId}"

General info

In this section we grouped together parameters necessary for the creation of a new user.

Parameters
  • name string required

    user display name

curl -XPOST "https://api.atoka.io/v2/app/users/{appUserId}" -d "name=Michele Barbera"

Response

The created object

{
"item": {
"name": "string",
"appUserId": "string"
}
}

User Update

With this endpoint you will be able to edit the metadata about your users, currently you can only update the display name of the user.

You CANNOT change the appUserId.

https://api.atoka.io/v2/app/users/{appUserId}

Replace {appUserId} with the application user id.

All requests must be properly authenticated.

Authentication

Parameters
  • token string required

    All requests must be properly authenticated; see the Authentication section for more info

curl -XPUT "https://api.atoka.io/v2/app/users/{appUserId}"

General info

In this section we grouped together parameters necessary for the user update.

Parameters
  • name string required

    user display name

curl -XPUT "https://api.atoka.io/v2/app/users/{appUserId}" -d "name=Michele Barbera"

Response

The created object

{
"item": {
"name": "string",
"appUserId": "string"
}
}

Sharekey Creation

A Share Key is an object that you can give to another user and it authorizes her to share a list with you. The access control to a list is connected to a user but through (at least one) share key.

With this endpoint you can generate a new Share Key for your user. You can have more than one share key at the time, in this way you can manage separately the authorization you give to other users. Each share key can also have an expiration time, after which it will be not valid anymore.

https://api.atoka.io/v2/app/users/{appUserId}/sharekeys

Replace {appUserId} with the application user id.

All requests must be properly authenticated.

Authentication

Parameters
  • token string required

    All requests must be properly authenticated; see the Authentication section for more info

curl -XPOST "https://api.atoka.io/v2/app/users/{appUserId}/sharekeys"

General info

In this section we grouped together parameters necessary for the creation of a new share key.

Parameters
  • note string

    any kind of note you want to attach to this key

  • expiration string

    expiration time of the key. The api will parse most known formats used to represent a time, but we suggest to use the iso format YYYY-MM-DDTHH:MM:SS

curl -XPOST "https://api.atoka.io/v2/app/users/{appUserId}/sharekeys"

Response

The created object

{
"item": {
"key": "string",
"note": "string",
"expiration": "string"
}
}

ShareKey for user

With this API you can retrieve all the sharekeys created for a user

https://api.atoka.io/v2/app/users/{appUserId}/sharekeys

Replace {appUserId} with the application user id.

All requests must be properly authenticated.

Authentication

Parameters
  • token string required

    All requests must be properly authenticated; see the Authentication section for more info

curl -G "https://api.atoka.io/v2/app/users/{appUserId}/sharekeys"

Response

The list of share keys

{
"items": [
{
"key": "string",
"note": "string",
"expiration": "string"
},
...
]
}

Delete Share Key

With this API you can delete a share key.

https://api.atoka.io/v2/app/users/{appUserId}/sharekeys/{key}

Replace {key} with the key you want to delete.

Replace {appUserId} with the application user id.

All requests must be properly authenticated.

response

All API endpoint requires to authorize each request in order to fulfill it.

Using these parameters, you'll be able to authorize your request.

Parameters
  • token string required

    All requests must be properly authenticated; see the Authentication section for more info

curl -XDELETE "https://api.atoka.io/v2/app/users/{appUserId}/sharekeys/{key}"