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 APIDSS-Version: Version of the DSS server answering the request
Services management ¶
Services ¶
Create a new servicePOST/admin/api/services
Creates a new APINode service.
🔒 Required privileges : ADMIN
Example URI
Headers
Content-Type: application/jsonBody
{
"serviceId": "Hello, world!"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"serviceId": {
"type": "string",
"default": "empty"
}
},
"required": [
"serviceId"
]
}200Headers
Content-Type: application/jsonBody
{
"ok": true
}List servicesGET/admin/api/services
Lists the currently declared services and their enabled/disabled state Streams the results of a query.
🔒 Required privileges : ADMIN
Example URI
200Body
[
{
"serviceId": "FRAUD_C1",
"enabled": true
},
{
"serviceId": "CHURN",
"enabled": false
}
]Service ¶
Remove a serviceDELETE/admin/api/services/{serviceId}
Removes a service immediately
🔒 Required privileges : ADMIN
Example URI
- serviceId
string(required)Identifier of the service to destroy
200Headers
Content-Type: application/jsonBody
{
"ok": true
}Services generations ¶
Generations ¶
List available generationsGET/admin/api/service/{serviceId}/generations
Lists the generations that are currently available on disk for a given service
Example URI
- serviceId
string(required)Identifier of the service
200Headers
Content-Type: application/jsonBody
TODOImport a generationPOST/admin/api/services/{serviceId}/generations/actions/importFromArchive
Imports a new generation on disk from an archive file (produced by DSS design node)
Example URI
- serviceId
string(required)Identifier of the service
Headers
Content-Type: application/x-www-form-urlencodedBody
{
"filePath": "Hello, world!"
}Schema
{
"type": "object",
"properties": {
"filePath": {
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}200Headers
Content-Type: application/jsonBody
{
"ok": true
}Generation ¶
Preload a generationPOST/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
- serviceId
string(required)Identifier of the service
- generationId
string(required)Identifier of the generation
200Headers
Content-Type: application/jsonBody
{
"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
- serviceId
string(required)Identifier of the service
200Headers
Content-Type: application/jsonBody
{
"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
- serviceId
string(required)Identifier of the service
- generationId
string(required)Identifier of the generation
200Headers
Content-Type: application/jsonBody
{
"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
- serviceId
string(required)Identifier of the service
Headers
Content-Type: application/jsonBody
{
"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"
}
}
}200Headers
Content-Type: application/jsonBody
{
"ok": true
}Disable servicePOST/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
- serviceId
string(required)Identifier of the service
200Headers
Content-Type: application/jsonBody
{
"ok": true
}Enable servicePOST/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
- serviceId
string(required)Identifier of the service
200Headers
Content-Type: application/jsonBody
{
"ok": true
}Authentication ¶
Admin keys ¶
List keysGET/admin/api/keys
Lists all admin API keys
Example URI
200Returns an array of the admin keys
Headers
Content-Type: application/jsonBody
[
{
"key": "Hello, world!",
"label": "Hello, world!",
"createdOn": 1
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Create admin keyPOST/admin/api/keys
Creates a new admin API key
Example URI
Headers
Content-Type: application/jsonBody
{
"label": "The new key"
}200Returns the full details of the newly created API key
Headers
Content-Type: application/jsonBody
{
"key": "tl1cba6Dy3uZCVy0q1RgtDFcGvCO5Nfh",
"label": "The new key",
"createdOn": 1445517657654
}