AccountsApi Resource

GET /account

Get the manager of the account and the list of users that are managed by this account.

 https://api.gavagai.se/explorer/v1/account
 

Response Body
media type data type description
application/json Account (JSON)

Example

Request
GET /account
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "pendingInvitations" : [ {
    "id" : 12345,
    "recipient" : {
      "userId" : "..."
    },
    "sender" : {
      "userId" : "..."
    },
    "created" : 12345
  }, {
    "id" : 12345,
    "recipient" : {
      "userId" : "..."
    },
    "sender" : {
      "userId" : "..."
    },
    "created" : 12345
  } ],
  "managedUsers" : [ {
    "userId" : "..."
  }, {
    "userId" : "..."
  } ],
  "manager" : {
    "userId" : "..."
  },
  "credits" : {
    "credits" : 12345
  }
}
                
              

GET /account/credits

Get the Explorer credits available for the logged in user. If the user has a manager, the credits available to the manager will be returned

 https://api.gavagai.se/explorer/v1/account/credits
 

Response Body
media type data type description
application/json UserCredits (JSON) The available explorer credits

Example

Request
GET /account/credits
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "credits" : 12345
}
                
              

POST /account/credits

Purchase Explorer credits for the logged in user.

 https://api.gavagai.se/explorer/v1/account/credits
 

Request Body
media type data type description
Response Body
media type data type description
application/json UserCredits (JSON) The available explorer credits for the logged in user after the update

Example

Request
POST /account/credits
Accept: application/json

              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "credits" : 12345
}
                
              

GET /account/invitations

Get all manager invitations sent to you. Each invitation is identified by an invitation id which is an integer. To accept or reject invitations, you need their id.

 https://api.gavagai.se/explorer/v1/account/invitations
 

Response Body
media type data type description
application/json array of ManagerInvitation (JSON)

Example

Request
GET /account/invitations
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "id" : 12345,
  "recipient" : {
    "userId" : "..."
  },
  "sender" : {
    "userId" : "..."
  },
  "created" : 12345
} ]
                
              

POST /account/invitations

Invite a user to be managed by you. Payments will be charged on you registered account. Note that the managed user will be able to accept overage payments.

 https://api.gavagai.se/explorer/v1/account/invitations
 

Request Parameters
name type description
userId query The username of the user to invite.
Response Body
media type data type description
application/json ManagerInvitation (JSON)

Example

Request
POST /account/invitations?userId={userId}
Accept: application/json

              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "id" : 12345,
  "recipient" : {
    "userId" : "..."
  },
  "sender" : {
    "userId" : "..."
  },
  "created" : 12345
}
                
              

DELETE /account/manager

Deletes the user's manager. Note that this will cancel your account and you will need to add payment details and reactivate.

 https://api.gavagai.se/explorer/v1/account/manager
 

Example

Request
DELETE /account/manager

              
Response
HTTP/1.1 204 No Content

              

GET /account/product

Get the Explorer product plan to which the user is currently subscribed, with the associated details

 https://api.gavagai.se/explorer/v1/account/product
 

Response Body
media type data type description
application/json ProductPlan (JSON) The details of the current Explorer product plan

Example

Request
GET /account/product
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "id" : 12345,
  "name" : "...",
  "handle" : "...",
  "description" : "...",
  "monthlyCostInCents" : 12345,
  "currency" : "..."
}
                
              

PUT /account/product

Update the Explorer product plan to which the user is subscribed. If the change is an upgrade, the product plan is instantly changed and a prorated amount is charged and prorated credits are added to the account. If the change is a downgrade, a change is scheduled for the start of the next billing cycle

 https://api.gavagai.se/explorer/v1/account/product
 

Request Body
media type data type description
Response Body
media type data type description
application/json ProductPlan (JSON) The details of the update Explorer product plan

Example

Request
PUT /account/product
Accept: application/json

              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "id" : 12345,
  "name" : "...",
  "handle" : "...",
  "description" : "...",
  "monthlyCostInCents" : 12345,
  "currency" : "..."
}
                
              

GET /account/seats

Get the number of Seats Available for the logged in user.

 https://api.gavagai.se/explorer/v1/account/seats
 

Response Body
media type data type description
application/json UserSeats (JSON) The number of available seats

Example

Request
GET /account/seats
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "seats" : 12345
}
                
              

PUT /account/seats

Update the number of Seats Available for the logged in user.If the change is an increase to the number of seats, a prorated amount is charged and prorated credits are added to the account.

 https://api.gavagai.se/explorer/v1/account/seats
 

Request Body
media type data type description
Response Body
media type data type description
application/json UserSeats (JSON) The number of available seats after the update

Example

Request
PUT /account/seats
Accept: application/json

              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "seats" : 12345
}
                
              

GET /account/settings

Get all user settings, their current values and a brief description of each of them.

 https://api.gavagai.se/explorer/v1/account/settings
 

Response Body
media type data type description
application/json array of UserSetting (JSON)

Example

Request
GET /account/settings
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
[ {
  "key" : "...",
  "value" : "...",
  "description" : "..."
} ]
                
              

PUT /account/settings

Updates user setting. Send a GET to the same url to get all available settings and their possible values.

 https://api.gavagai.se/explorer/v1/account/settings
 

Request Body
media type data type description
application/json array of UserSetting (JSON) The key value pair
Response Body
media type data type description
application/json array of UserSetting (JSON) The updated settings.

Example

Request
PUT /account/settings
Content-Type: application/json
Accept: application/json

                
[ {
  "key" : "...",
  "value" : "...",
  "description" : "..."
} ]
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
[ {
  "key" : "...",
  "value" : "...",
  "description" : "..."
} ]
                
              

GET /account/usage

Retrieves Explorer usage information for the authenticated user, that is, the number of projects started and verbatims used in the given time period.

 https://api.gavagai.se/explorer/v1/account/usage
 

Request Parameters
name type description constraints
period query Short-hand for retrieving usage information for the current day or month. Period takes precedence over sinceDate and untilDate. When called without parameters, this method assumes period = month by default. "DAY" or "MONTH"
sinceDate query The day starting the period for which the usage should be computed. The format of the date is yyyy-MM-dd.  
untilDate query The day ending the period. Note that untilDate must be after sinceDate. The format of the date is yyyy-MM-dd, e.g., 2016-09-01. For retrieving the usage for the first of september, 2016, sinceDate should be 2016-09-01 and untilDate should be 2016-09-02.  
Response Body
media type data type description
application/json UsageDetails (JSON) Usage information in terms of number of projects started and verbatims analyzed in the time period.

Example

Request
GET /account/usage?period={period}
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "monthsProjectsTrialing" : 12345,
  "monthsVerbatimsTrialing" : 12345,
  "todaysProjectsTrialing" : 12345,
  "todaysVerbatimsTrialing" : 12345,
  "totalNumberOfProjectsTrialingInPeriod" : 12345,
  "totalNumberOfVerbatimsTrialingInPeriod" : 12345,
  "todaysProjectsNonTrialing" : 12345,
  "todaysVerbatimsNonTrialing" : 12345,
  "monthsProjectsNonTrialing" : 12345,
  "monthsVerbatimsNonTrialing" : 12345,
  "totalNumberOfProjectsNonTrialingInPeriod" : 12345,
  "totalNumberOfVerbatimsNonTrialingInPeriod" : 12345
}
                
              

DELETE /account/invitations/{id}

Delete an invitation created by you.

 https://api.gavagai.se/explorer/v1/account/invitations/{id}
 

Request Parameters
name type description constraints
id path int

Example

Request
DELETE /account/invitations/{id}

              
Response
HTTP/1.1 204 No Content

              

DELETE /account/managedUsers/{userId}

Remove a managed user that has accepted your invitation. Note that this will cancel the user's account and they will need to reactivate it manually.

 https://api.gavagai.se/explorer/v1/account/managedUsers/{userId}
 

Request Parameters
name type description
userId path The username of the managed user to remove.

Example

Request
DELETE /account/managedUsers/{userId}

              
Response
HTTP/1.1 204 No Content

              

DELETE /account/product/migration

Cancel an upcoming migration to a product plan. If there is no scheduled migration,an exception is thrown

 https://api.gavagai.se/explorer/v1/account/product/migration
 

Example

Request
DELETE /account/product/migration

              
Response
HTTP/1.1 204 No Content

              

PUT /account/invitations/{id}/accept

Accept a manager invitation. By accepting the invitation payments will be handled by your manager account.

 https://api.gavagai.se/explorer/v1/account/invitations/{id}/accept
 

Request Parameters
name type description constraints
id path int

Example

Request
PUT /account/invitations/{id}/accept

              
Response
HTTP/1.1 204 No Content

              

PUT /account/invitations/{id}/reject

Reject a manager invitation.

 https://api.gavagai.se/explorer/v1/account/invitations/{id}/reject
 

Request Parameters
name type description constraints
id path int

Example

Request
PUT /account/invitations/{id}/reject

              
Response
HTTP/1.1 204 No Content