Back to top

Dataiku DSS APINode Admin API

General API notes

  • Many API calls may return additional attributes compared to the documentation. The stability of these additional attributes is not guaranteed. They may be modified or removed in future releases without notice.

  • All API calls will return the following two HTTP headers

    • DSS-API-Version: Version of the API
    • DSS-Version : Version of the DSS server answering the request

Services management

Services

Create a new service
POST/admin/api/services

Creates a new APINode service.


🔒 Required privileges : ADMIN

Example URI

POST /admin/api/services
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "serviceId": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "serviceId": {
      "type": "string",
      "default": "empty"
    }
  },
  "required": [
    "serviceId"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "ok": true
}

List services
GET/admin/api/services

Lists the currently declared services and their enabled/disabled state Streams the results of a query.


🔒 Required privileges : ADMIN

Example URI

GET /admin/api/services
Response  200
HideShow
Body
[
  {
    "serviceId": "FRAUD_C1",
    "enabled": true
  },
  {
    "serviceId": "CHURN",
    "enabled": false
  }
]

Service

Remove a service
DELETE/admin/api/services/{serviceId}

Removes a service immediately


🔒 Required privileges : ADMIN

Example URI

DELETE /admin/api/services/serviceId
URI Parameters
HideShow
serviceId
string (required) 

Identifier of the service to destroy

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "ok": true
}

Services generations

Generations

List available generations
GET/admin/api/service/{serviceId}/generations

Lists the generations that are currently available on disk for a given service

Example URI

GET /admin/api/service/serviceId/generations
URI Parameters
HideShow
serviceId
string (required) 

Identifier of the service

Response  200
HideShow
Headers
Content-Type: application/json
Body
TODO

Import a generation
POST/admin/api/services/{serviceId}/generations/actions/importFromArchive

Imports a new generation on disk from an archive file (produced by DSS design node)

Example URI

POST /admin/api/services/serviceId/generations/actions/importFromArchive
URI Parameters
HideShow
serviceId
string (required) 

Identifier of the service

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
{
  "filePath": "Hello, world!"
}
Schema
{
  "type": "object",
  "properties": {
    "filePath": {
      "type": "string"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "ok": true
}

Generation

Preload a generation
POST/admin/api/services/{serviceId}/generations/{generationId}/preload

Preloads a generation in memory on the API node server.

Preloading a generation does not change anything to the way the server handles the requests. It makes a subsequent setMapping or switchTo call using this generation much faster since only the in-memory switch needs to be made.

Preloading a generation also ensures that the data for the generation is consistent.

Example URI

POST /admin/api/services/serviceId/generations/generationId/preload
URI Parameters
HideShow
serviceId
string (required) 

Identifier of the service

generationId
string (required) 

Identifier of the generation

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "ok": true
}

Service state

Set generations

Switch to newest gen.
POST/admin/api/services/{serviceId}/actions/switchToNewest

Switches a service to the newest available generation. The service is enabled if it was disabled. Only one generation will be serving queries.

Currently running queries are not affected.

Example URI

POST /admin/api/services/serviceId/actions/switchToNewest
URI Parameters
HideShow
serviceId
string (required) 

Identifier of the service

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "ok": true
}

Switch to explicit gen.
POST/admin/api/services/{serviceId}/actions/switchTo/{generationId}

Switches a service to a specific generation. The service is enabled if it was disabled. Only one generation will be serving queries.

Currently running queries are not affected.

Example URI

POST /admin/api/services/serviceId/actions/switchTo/generationId
URI Parameters
HideShow
serviceId
string (required) 

Identifier of the service

generationId
string (required) 

Identifier of the generation

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "ok": true
}

Set generations mapping.
POST/admin/api/services/{serviceId}/actions/setMapping

Sets the currently active mapping of generations and probabilities for this service. The service is enabled if it was disabled.

Multiple generations may serve queries.

Currently running queries are not affected.

Example URI

POST /admin/api/services/serviceId/actions/setMapping
URI Parameters
HideShow
serviceId
string (required) 

Identifier of the service

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "entries": [
    {
      "generation": "Hello, world!",
      "proba": 1
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "entries": {
      "type": "array",
      "description": "Entries of the mapping"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "ok": true
}

Disable service
POST/admin/api/services/{serviceId}/actions/disable

Disables a service. Disabling a service does not interrupt currently running queries, but no new queries may be started.

Example URI

POST /admin/api/services/serviceId/actions/disable
URI Parameters
HideShow
serviceId
string (required) 

Identifier of the service

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "ok": true
}

Enable service
POST/admin/api/services/{serviceId}/actions/enable

Enables a service. The service must have an active generations mapping prior to calling this.

As soon as this call returns, the service is ready to answer queries

Example URI

POST /admin/api/services/serviceId/actions/enable
URI Parameters
HideShow
serviceId
string (required) 

Identifier of the service

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "ok": true
}

Authentication

Admin keys

List keys
GET/admin/api/keys

Lists all admin API keys

Example URI

GET /admin/api/keys
Response  200
HideShow

Returns an array of the admin keys

Headers
Content-Type: application/json
Body
[
  {
    "key": "Hello, world!",
    "label": "Hello, world!",
    "createdOn": 1
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Create admin key
POST/admin/api/keys

Creates a new admin API key

Example URI

POST /admin/api/keys
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "The new key"
}
Response  200
HideShow

Returns the full details of the newly created API key

Headers
Content-Type: application/json
Body
{
  "key": "tl1cba6Dy3uZCVy0q1RgtDFcGvCO5Nfh",
  "label": "The new key",
  "createdOn": 1445517657654
}

Generated by aglio on 14 Jun 2024