1. Introduction
This is the REST API documentation for Genie version 4.3.19. Here you will find specific details of how to invoke the Genie REST API and what you can expect as return values.
For more Genie information see the website. |
For high level information and installation instructions please see the reference guide. |
For a demo of this version of Genie please see demo guide. |
2. Assumptions
This documentation assumes a basic knowledge of how REST APIs work. If you don’t know things like HTTP verbs see websites like this one.
3. HATEOAS
A lot of the API’s return application/hal+json
as a content type. This is a superset of JSON built to support
HATEOAS (Hypermedia as the Engine of Application State). Rather than re-writing what
HATEOAS is see this great write up on the Spring Website about it.
4. Security
All of this documentation assumes security is disabled for Genie. If your installation has security enabled the REST APIs will be secured via OAuth2 or x509 certs or both.
These are the currently supported API security mechanisms but others could be plugged in. We’ll only talk about OAuth2 here for now until another implementation is done. |
4.1. OAuth2
If OAuth2 is enabled you’ll need to send your JWT you got back from your provider along with your
API request. This is accomplished by setting your Authorization
header to a value of Bearer {your token here}
.
4.2. x509
If your admin has security Genie using client and server certificates mechanisms you’ll need to send your client certificate along with your request.
Something like curl --cert {your cert} {genie endpoint}
5. Resources
This section contains the documentation for various resources sent to and from the various Genie APIs. Note their structure and fields, particularly what is marked optional. Optional means when you submit one of these resources to Genie you don’t need to set that field. Genie either doesn’t require it or if it does, as is the case with ID’s, it will create one if you don’t provide it. When you get a resource all fields Genie has stored will be returned.
5.1. Application
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
configs |
Array |
Any configuration files needed for the resource |
true |
|
type |
String |
The type of application this is (e.g. hadoop, presto, spark). Can be used to group. |
true |
|
status |
String |
The status of the application. Options: [ACTIVE, DEPRECATED, INACTIVE] |
Must not be null |
false |
dependencies |
Array |
The dependencies for the application |
true |
5.2. Cluster
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
configs |
Array |
Any configuration files needed for the resource |
true |
|
status |
String |
The status of the cluster. Options: [UP, OUT_OF_SERVICE, TERMINATED] |
Must not be null |
false |
dependencies |
Array |
The dependencies for the cluster |
true |
5.3. Command
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
configs |
Array |
Any configuration files needed for the resource |
true |
|
status |
String |
The status of the command. Options: [ACTIVE, DEPRECATED, INACTIVE] |
Must not be null |
false |
executable |
String |
The executable to run on the Genie node when this command is used. e.g. /usr/bin/hadoop |
Must not be empty. Size must be between 0 and 1024 inclusive |
false |
executableAndArguments |
Array |
The executable and arguments to run on the Genie node when this command is used. e.g. /usr/bin/hadoop |
Must not be empty |
false |
checkDelay |
Number |
Deprecated as of 4.3.0. Now is a no-op on the server side. |
false |
|
memory |
Number |
The default amount of memory (in MB) that should be allocated for instances of this command client |
Must be at least 1 |
true |
dependencies |
Array |
The dependencies for the command |
true |
|
clusterCriteria |
Array |
The priority ordered list of criteria to resolve clusters that this command can run jobs on |
true |
|
runtime |
Object |
The various job runtime parameters that should be used if this command is used |
false |
5.4. Job Request
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
commandArgs |
String |
Any arguments to append to the command executable when the job is run |
Size must be between 0 and 10000 inclusive |
true |
clusterCriterias |
Array |
List of cluster criteria’s for which a match will be attempted with register cluster tags. Each set of tags within a given cluster criteria must have at least one non-blank (e.g. ' ', ' ', null) tag. |
Must not be empty |
false |
commandCriteria |
Array |
Set of tags which will attempt to match against the commands linked to selected cluster. There must be at least one non-blank (e.g. ' ', ' ', null) criteria within the set |
Must not be empty |
false |
group |
String |
A group that the job should be run under on the linux system |
Size must be between 0 and 255 inclusive |
true |
disableLogArchival |
Boolean |
If you want to disable backing up job output files set this to true. Default: false |
true |
|
String |
If you want e-mail notification on job completion enter address here |
Must be a well-formed email address. Size must be between 0 and 255 inclusive |
true |
|
cpu |
Number |
For future use. Currently has no impact. |
Must be at least 1 |
true |
memory |
Number |
The amount of memory (in MB) desired for job client. Cannot exceed configured max. |
Must be at least 1 |
true |
timeout |
Number |
The timeout (in seconds) after which job will be killed by system, system setting used if not set |
Must be at least 1 |
true |
configs |
Array |
URI’s of configuration files which will be downloaded into job working directory at runtime |
true |
|
dependencies |
Array |
URI’s of dependency files which will be downloaded into job working directory at runtime |
true |
|
applications |
Array |
Complete list of application ids if power user wishes to override selected command defaults |
true |
|
grouping |
String |
The grouping of the job relative to other jobs. e.g. scheduler job name |
true |
|
groupingInstance |
String |
The grouping instance of the job relative to other jobs. e.g. scheduler job run |
true |
|
runtime |
Object |
The requested job runtime values |
false |
5.5. Job
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
commandArgs |
String |
Any arguments to append to the command executable when the job is run |
Size must be between 0 and 10000 inclusive |
true |
status |
String |
The status of the job. Options: [RESERVED, RESOLVED, ACCEPTED, CLAIMED, INIT, RUNNING, SUCCEEDED, KILLED, FAILED, INVALID] |
Must not be null |
false |
statusMsg |
String |
The status message of the job |
Size must be between 0 and 255 inclusive |
true |
started |
String |
The time (UTC ISO8601 with millis) the job was started |
true |
|
finished |
String |
The time (UTC ISO8601 with millis) the job finished |
true |
|
archiveLocation |
String |
The URI where the working directory zip was stored |
Size must be between 0 and 1024 inclusive |
true |
clusterName |
String |
The name of the cluster the job was run on if it’s been determined |
Size must be between 0 and 255 inclusive |
true |
commandName |
String |
The name of the command the job was run with if it’s been determined |
Size must be between 0 and 255 inclusive |
true |
runtime |
String |
Runtime of the job in ISO8601 duration format |
Must not be null |
true |
grouping |
String |
The grouping of the job relative to other jobs. e.g. scheduler job name |
true |
|
groupingInstance |
String |
The grouping instance of the job relative to other jobs. e.g. scheduler job run |
true |
5.6. Job Execution
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
hostName |
String |
The host name of the Genie node responsible for the job |
Size must be between 1 and 1024 inclusive |
false |
processId |
Number |
The id of the job client process on the Genie node |
true |
|
checkDelay |
Number |
The amount of time in milliseconds between checks of the job status by Genie |
Must be at least 1 |
true |
timeout |
String |
The date (UTC ISO8601 with millis) when the job will be killed by Genie due to timeout |
true |
|
exitCode |
Number |
The job client process exit code after the job is done |
true |
|
memory |
Number |
The amount of memory (in MB) allocated to the job client |
Must be at least 1 |
true |
archiveStatus |
String |
The archival status of the job directory |
true |
|
launcherExt |
Object |
JSON object that contains metadata specific to the launcher implementation for the job |
true |
|
runtime |
Object |
The runtime execution environment for a job |
false |
5.7. Job Metadata
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
clientHost |
String |
The host name of the client that submitted the job to Genie |
true |
|
userAgent |
String |
The user agent string that was passed to Genie on job request |
true |
|
numAttachments |
Number |
The number of attachments sent to Genie with the job request |
true |
|
totalSizeOfAttachments |
Number |
The total size of all attachments sent to Genie with the job request. In bytes. |
true |
|
stdOutSize |
Number |
The final size of the stdout file after a job is completed. In bytes. |
true |
|
stdErrSize |
Number |
The final size of the stderr file after a job is completed. In bytes. |
true |
5.8. Criterion
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The unique identifier a resource needs to have to match this criterion |
true |
|
name |
String |
The name a resource needs to have to match this criterion |
true |
|
version |
String |
The version a resource needs to have to match this criterion |
true |
|
status |
String |
The status a resource needs to have to match this criterion |
true |
|
tags |
Array |
The set of tags a resource needs to have to match this criterion |
true |
6. Jobs API
6.1. Submit a Job
6.1.1. Description
The main API in Genie. Submitting a job to be run.
There are two different ways to submit a job to Genie. Both go to the same endpoint but you can simply send a JSON
payload if you have no attachments. This means setting your content type to application/json
. If you do have
attachments you want to send with your job request you need to set the content type to multipart/form-data
and
post the request that way. Examples are below.
6.1.2. Endpoint
POST /api/v3/jobs
The id in this example is optional. If you include one Genie will use it. If not it will provide one. If you provide one it must be unique. |
This Example is without attachments |
6.1.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
None
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
commandArgs |
String |
Any arguments to append to the command executable when the job is run |
Size must be between 0 and 10000 inclusive |
true |
clusterCriterias |
Array |
List of cluster criteria’s for which a match will be attempted with register cluster tags. Each set of tags within a given cluster criteria must have at least one non-blank (e.g. ' ', ' ', null) tag. |
Must not be empty |
false |
commandCriteria |
Array |
Set of tags which will attempt to match against the commands linked to selected cluster. There must be at least one non-blank (e.g. ' ', ' ', null) criteria within the set |
Must not be empty |
false |
group |
String |
A group that the job should be run under on the linux system |
Size must be between 0 and 255 inclusive |
true |
disableLogArchival |
Boolean |
If you want to disable backing up job output files set this to true. Default: false |
true |
|
String |
If you want e-mail notification on job completion enter address here |
Must be a well-formed email address. Size must be between 0 and 255 inclusive |
true |
|
cpu |
Number |
For future use. Currently has no impact. |
Must be at least 1 |
true |
memory |
Number |
The amount of memory (in MB) desired for job client. Cannot exceed configured max. |
Must be at least 1 |
true |
timeout |
Number |
The timeout (in seconds) after which job will be killed by system, system setting used if not set |
Must be at least 1 |
true |
configs |
Array |
URI’s of configuration files which will be downloaded into job working directory at runtime |
true |
|
dependencies |
Array |
URI’s of dependency files which will be downloaded into job working directory at runtime |
true |
|
applications |
Array |
Complete list of application ids if power user wishes to override selected command defaults |
true |
|
grouping |
String |
The grouping of the job relative to other jobs. e.g. scheduler job name |
true |
|
groupingInstance |
String |
The grouping instance of the job relative to other jobs. e.g. scheduler job run |
true |
|
runtime |
Object |
The requested job runtime values |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/jobs' -i -X POST \
-H 'Content-Type: application/json' \
-d '{
"id" : null,
"created" : null,
"updated" : null,
"version" : "1.0",
"user" : "genie",
"name" : "List * ... Directories bash job",
"description" : "Genie 3 Test Job",
"metadata" : {
"schedulerJobName" : "7443484c-90b8-4dc3-a12c-5e75c37865c0",
"schedulerRunId" : "e3f580f7-2b8f-4ded-b092-391a9eb4f9ea"
},
"tags" : [ "aTag", "zTag" ],
"configs" : [ "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/job/config1" ],
"dependencies" : [ "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/job/dep1" ],
"setupFile" : "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/job/jobsetupfile",
"commandArgs" : "-c 'sleep 5 && echo hello world'",
"clusterCriterias" : [ {
"tags" : [ "localhost" ]
} ],
"commandCriteria" : [ "bash" ],
"group" : null,
"disableLogArchival" : false,
"email" : null,
"cpu" : null,
"memory" : null,
"timeout" : null,
"applications" : [ ],
"grouping" : "Workflow.Foo",
"groupingInstance" : "Workflow.Foo_Step.Blah-2020021919:12:34.000_1",
"runtime" : {
"resources" : {
"cpu" : null,
"gpu" : null,
"memoryMb" : null,
"diskMb" : null,
"networkMbps" : null
},
"images" : { }
}
}'
HTTPie
$ echo '{
"id" : null,
"created" : null,
"updated" : null,
"version" : "1.0",
"user" : "genie",
"name" : "List * ... Directories bash job",
"description" : "Genie 3 Test Job",
"metadata" : {
"schedulerJobName" : "7443484c-90b8-4dc3-a12c-5e75c37865c0",
"schedulerRunId" : "e3f580f7-2b8f-4ded-b092-391a9eb4f9ea"
},
"tags" : [ "aTag", "zTag" ],
"configs" : [ "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/job/config1" ],
"dependencies" : [ "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/job/dep1" ],
"setupFile" : "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/job/jobsetupfile",
"commandArgs" : "-c 'sleep 5 && echo hello world'",
"clusterCriterias" : [ {
"tags" : [ "localhost" ]
} ],
"commandCriteria" : [ "bash" ],
"group" : null,
"disableLogArchival" : false,
"email" : null,
"cpu" : null,
"memory" : null,
"timeout" : null,
"applications" : [ ],
"grouping" : "Workflow.Foo",
"groupingInstance" : "Workflow.Foo_Step.Blah-2020021919:12:34.000_1",
"runtime" : {
"resources" : {
"cpu" : null,
"gpu" : null,
"memoryMb" : null,
"diskMb" : null,
"networkMbps" : null
},
"images" : { }
}
}' | http POST 'https://genie.example.com/api/v3/jobs' \
'Content-Type:application/json'
Response Documentation
Headers
Name | Description |
---|---|
|
The URI |
Payload Fields
None
HATEOAS Links
None
HTTP Messages
Request
POST /api/v3/jobs HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 1505
{
"id" : null,
"created" : null,
"updated" : null,
"version" : "1.0",
"user" : "genie",
"name" : "List * ... Directories bash job",
"description" : "Genie 3 Test Job",
"metadata" : {
"schedulerJobName" : "7443484c-90b8-4dc3-a12c-5e75c37865c0",
"schedulerRunId" : "e3f580f7-2b8f-4ded-b092-391a9eb4f9ea"
},
"tags" : [ "aTag", "zTag" ],
"configs" : [ "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/job/config1" ],
"dependencies" : [ "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/job/dep1" ],
"setupFile" : "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/job/jobsetupfile",
"commandArgs" : "-c 'sleep 5 && echo hello world'",
"clusterCriterias" : [ {
"tags" : [ "localhost" ]
} ],
"commandCriteria" : [ "bash" ],
"group" : null,
"disableLogArchival" : false,
"email" : null,
"cpu" : null,
"memory" : null,
"timeout" : null,
"applications" : [ ],
"grouping" : "Workflow.Foo",
"groupingInstance" : "Workflow.Foo_Step.Blah-2020021919:12:34.000_1",
"runtime" : {
"resources" : {
"cpu" : null,
"gpu" : null,
"memoryMb" : null,
"diskMb" : null,
"networkMbps" : null
},
"images" : { }
}
}
Response
HTTP/1.1 202 Accepted
Location: https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad
Date: Thu, 11 Jul 2024 19:00:06 GMT
Keep-Alive: timeout=60
Connection: keep-alive
This example is with attachments |
6.1.4. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
multipart/form-data |
Path Parameters
None
Query Parameters
None
Payload Fields
Part | Description |
---|---|
|
The job request JSON. Content type must be application/json for part |
|
An attachment file. There can be multiple. Type should be octet-stream |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/jobs' -i -X POST \
-H 'Content-Type: multipart/form-data; boundary="OVWs7A3ZvBMFZxgJvM01TZmwDpKhkgtiB"' \
-F 'request=@file;type=application/json' \
-F 'attachment=@query.sql;type=application/octet-stream' \
-F 'attachment=@query2.sql;type=application/octet-stream'
HTTPie
$ http --multipart POST 'https://genie.example.com/api/v3/jobs' \
'request'@'file' \
'attachment'@'query.sql' \
'attachment'@'query2.sql'
Response Documentation
Headers
Name | Description |
---|---|
|
The URI |
Payload Fields
None
HATEOAS Links
None
HTTP Messages
Request
POST /api/v3/jobs HTTP/1.1
Content-Type: multipart/form-data; boundary="OVWs7A3ZvBMFZxgJvM01TZmwDpKhkgtiB"; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Host: genie.example.com
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=request; filename=file
Content-Type: application/json
{"id":null,"created":null,"updated":null,"version":"1.0","user":"genie","name":"List * ... Directories bash job","description":"Genie 3 Test Job","metadata":null,"tags":[],"configs":[],"dependencies":[],"setupFile":"file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/job/jobsetupfile","commandArgs":"-c 'sleep 5 && echo hello world'","clusterCriterias":[{"tags":["localhost"]}],"commandCriteria":["bash"],"group":null,"disableLogArchival":true,"email":null,"cpu":null,"memory":null,"timeout":null,"applications":[],"grouping":null,"groupingInstance":null,"runtime":{"resources":{"cpu":null,"gpu":null,"memoryMb":null,"diskMb":null,"networkMbps":null},"images":{}}}
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=attachment; filename=query.sql
Content-Type: application/octet-stream
--
--
-- Copyright 2018 Netflix, Inc.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- https://genie.example.com/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
--
select * from myTable;
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=attachment; filename=query2.sql
Content-Type: application/octet-stream
--
--
-- Copyright 2018 Netflix, Inc.
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- https://genie.example.com/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
--
SELECT * FROM your_table JOIN my_table ON your_table.id = my_table.id WHERE x > 50;
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
Response
HTTP/1.1 202 Accepted
Location: https://genie.example.com/api/v3/jobs/5a93a2e3-c0a3-41ca-8a36-995d0b211ff2
Date: Thu, 11 Jul 2024 19:00:33 GMT
Keep-Alive: timeout=60
Connection: keep-alive
6.2. Find Jobs
6.2.1. Description
Search for jobs using query parameters.
6.2.2. Endpoint
GET /api/v3/jobs
6.2.3. API Docs
Request Documentation
Headers
None
Path Parameters
None
Query Parameters
Parameter | Description |
---|---|
|
The page number to get. Default to 0. |
|
The size of the page to get. Default to 64. |
|
The fields to sort the results by. Defaults to 'updated,desc'. |
|
The id of the jobs to find. Use % symbol for regex like search. |
|
The name of the jobs to find. Use % symbol for regex like search. |
|
The user of the jobs to find. Use % symbol for regex like search. |
|
The status(es) of the jobs to find. Can have multiple. Options: [RESERVED, RESOLVED, ACCEPTED, CLAIMED, INIT, RUNNING, SUCCEEDED, KILLED, FAILED, INVALID] |
|
The tag(s) of the jobs to find. Can have multiple. |
|
The name of the cluster on which the jobs ran. Use % symbol for regex like search. |
|
The id of the cluster on which the jobs ran. |
|
The name of the command which was executed by the job. Use % symbol for regex like search. |
|
The id of the command which was executed by the job. |
|
The minimum started time of the job in milliseconds since epoch. (inclusive) |
|
The maximum started time of the job in milliseconds since epoch. (exclusive) |
|
The minimum finished time of the job in milliseconds since epoch. (inclusive) |
|
The maximum finished time of the job in milliseconds since epoch. (exclusive) |
|
The grouping the job should be a member of. Use % symbol for regex like search. |
|
The grouping instance the job should be a member of. Use % symbol for regex like search. |
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/jobs?user=genie' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/jobs?user=genie'
Response Documentation
Headers
Name | Description |
---|---|
|
application/hal+json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
_links |
Object |
Links to other resources. |
false |
|
page |
Object |
The result page information. |
false |
|
page.size |
Number |
The number of elements in this page result. |
false |
|
page.totalElements |
Number |
The total number of elements this search result could return. |
false |
|
page.totalPages |
Number |
The total number of pages there could be at the current page size. |
false |
|
page.number |
Number |
The current page number. |
false |
|
_embedded.jobSearchResultList |
Array |
The found jobs. |
false |
HATEOAS Links
Relation | Description |
---|---|
|
The current search |
|
The first page for this search |
|
The previous page for this search |
|
The next page for this search |
|
The last page for this search |
HTTP Messages
Request
GET /api/v3/jobs?user=genie HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 19:00:19 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 947
{
"_embedded" : {
"jobSearchResultList" : [ {
"id" : "a110c6a7-91df-4f48-bd77-446a861304ad",
"name" : "List * ... Directories bash job",
"user" : "genie",
"status" : "SUCCEEDED",
"started" : "2024-07-11T19:00:13.310Z",
"finished" : "2024-07-11T19:00:18.433Z",
"clusterName" : "Local laptop",
"commandName" : "Unix Bash command",
"runtime" : "PT5.123S",
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/jobs?user=genie{&id,name,status,tag,clusterName,clusterId,commandName,commandId,minStarted,maxStarted,minFinished,maxFinished,grouping,groupingInstance}",
"templated" : true
}
},
"page" : {
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
6.3. Get a Job
6.3.1. Description
Get metadata about a specific job.
6.3.2. Endpoint
GET /api/v3/jobs/{id}
6.3.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad'
Response Documentation
Headers
Name | Description |
---|---|
|
application/hal+json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
commandArgs |
String |
Any arguments to append to the command executable when the job is run |
Size must be between 0 and 10000 inclusive |
true |
status |
String |
The status of the job. Options: [RESERVED, RESOLVED, ACCEPTED, CLAIMED, INIT, RUNNING, SUCCEEDED, KILLED, FAILED, INVALID] |
Must not be null |
false |
statusMsg |
String |
The status message of the job |
Size must be between 0 and 255 inclusive |
true |
started |
String |
The time (UTC ISO8601 with millis) the job was started |
true |
|
finished |
String |
The time (UTC ISO8601 with millis) the job finished |
true |
|
archiveLocation |
String |
The URI where the working directory zip was stored |
Size must be between 0 and 1024 inclusive |
true |
clusterName |
String |
The name of the cluster the job was run on if it’s been determined |
Size must be between 0 and 255 inclusive |
true |
commandName |
String |
The name of the command the job was run with if it’s been determined |
Size must be between 0 and 255 inclusive |
true |
runtime |
String |
Runtime of the job in ISO8601 duration format |
Must not be null |
true |
grouping |
String |
The grouping of the job relative to other jobs. e.g. scheduler job name |
true |
|
groupingInstance |
String |
The grouping instance of the job relative to other jobs. e.g. scheduler job run |
true |
HATEOAS Links
Relation | Description |
---|---|
|
URI for this job |
|
The request that kicked off this job |
|
The job execution information for this job |
|
The job metadata information for this job |
|
The output URI for the job |
|
The current status of the job |
|
The cluster this job ran on |
|
The command this job executed |
|
The applications this job used |
HTTP Messages
Request
GET /api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 19:00:18 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 2087
{
"id" : "a110c6a7-91df-4f48-bd77-446a861304ad",
"created" : "2024-07-11T19:00:07.352Z",
"updated" : "2024-07-11T19:00:18.516Z",
"version" : "1.0",
"user" : "genie",
"name" : "List * ... Directories bash job",
"description" : "Genie 3 Test Job",
"metadata" : {
"schedulerJobName" : "7443484c-90b8-4dc3-a12c-5e75c37865c0",
"schedulerRunId" : "e3f580f7-2b8f-4ded-b092-391a9eb4f9ea"
},
"tags" : [ "aTag", "zTag" ],
"status" : "SUCCEEDED",
"statusMsg" : "Job finished successfully.",
"started" : "2024-07-11T19:00:13.310Z",
"finished" : "2024-07-11T19:00:18.433Z",
"archiveLocation" : "file:///tmp/genie/archives/a110c6a7-91df-4f48-bd77-446a861304ad",
"clusterName" : "Local laptop",
"commandName" : "Unix Bash command",
"runtime" : "PT5.123S",
"commandArgs" : "-c 'sleep 5 && echo hello world'",
"grouping" : "Workflow.Foo",
"groupingInstance" : "Workflow.Foo_Step.Blah-2020021919:12:34.000_1",
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad"
},
"output" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output"
},
"request" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/request"
},
"execution" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/execution"
},
"metadata" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/metadata"
},
"status" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/status"
},
"cluster" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/cluster"
},
"command" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/command"
},
"applications" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/applications"
}
}
}
6.4. Kill a Job
6.4.1. Description
Request for a job to be killed.
6.4.2. Endpoint
DELETE /api/v3/jobs/{id}
6.4.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/jobs/9dc1ed93-20b8-4612-9283-8fc5c5181eca' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/jobs/9dc1ed93-20b8-4612-9283-8fc5c5181eca'
HTTP Messages
Request
DELETE /api/v3/jobs/9dc1ed93-20b8-4612-9283-8fc5c5181eca HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 202 Accepted
Date: Thu, 11 Jul 2024 19:00:06 GMT
Keep-Alive: timeout=60
Connection: keep-alive
6.5. Get Job Status
6.5.1. Description
Get the current status of a job.
6.5.2. Endpoint
GET /api/v3/jobs/{id}/status
6.5.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/status' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/status'
Response Documentation
Headers
Name | Description |
---|---|
|
application/json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
status |
String |
The job status. One of: [RESERVED, RESOLVED, ACCEPTED, CLAIMED, INIT, RUNNING, SUCCEEDED, KILLED, FAILED, INVALID] |
false |
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/status HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 19:00:18 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 28
{
"status" : "SUCCEEDED"
}
6.6. Get Contents From the Job Working Directory
6.6.1. Description
This API acts as a file browser for the remote working directory of your job. You can request endpoints and if it is a directory you will be shown the contents of the directory and be able to navigate. If the endpoint points to a file it will return the file.
6.6.2. Endpoint
GET /api/v3/jobs/{id}/output/{path}**
6.6.3. Getting a directory as JSON
This is the default behavior for directories if no Accept header is present
|
6.6.4. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
|
The path to the directory to get |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/' -i -X GET \
-H 'Accept: application/json'
HTTPie
$ http GET 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/' \
'Accept:application/json'
Response Documentation
Headers
Name | Description |
---|---|
|
application/json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
parent |
Object |
Information about the parent of this directory |
true |
|
parent.name |
String |
The name of the parent directory |
true |
|
parent.url |
String |
The url to get the parent |
true |
|
parent.size |
Number |
The size of the parent in bytes |
true |
|
parent.lastModified |
String |
The last time the parent was modified in ISO8601 UTC with milliseconds included |
true |
|
directories |
Array |
All the subdirectories of this directory |
false |
|
directories[].name |
String |
The name of the directory |
false |
|
directories[].url |
String |
The url to get the directory |
false |
|
directories[].size |
Number |
The size of the directory in bytes |
false |
|
directories[].lastModified |
String |
The last time the directory was modified in ISO8601 UTC with milliseconds included |
false |
|
files |
Array |
All the files in this directory |
false |
|
files[].name |
String |
The name of the file |
false |
|
files[].url |
String |
The url to get the file |
false |
|
files[].size |
Number |
The size of the file in bytes |
false |
|
files[].lastModified |
String |
The last time the file was modified in ISO8601 UTC with milliseconds included |
false |
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/ HTTP/1.1
Accept: application/json
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1459
Date: Thu, 11 Jul 2024 19:00:18 GMT
Keep-Alive: timeout=60
Connection: keep-alive
{
"parent" : null,
"directories" : [ {
"name" : "genie/",
"url" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/genie",
"size" : 4096,
"lastModified" : "2024-07-11T19:00:13.274Z"
} ],
"files" : [ {
"name" : "config1",
"url" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/config1",
"size" : 0,
"lastModified" : "2024-07-11T19:00:13.030Z"
}, {
"name" : "dep1",
"url" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/dep1",
"size" : 0,
"lastModified" : "2024-07-11T19:00:13.030Z"
}, {
"name" : "genie_setup.sh",
"url" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/genie_setup.sh",
"size" : 0,
"lastModified" : "2024-07-11T19:00:13.034Z"
}, {
"name" : "run",
"url" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/run",
"size" : 3828,
"lastModified" : "2024-07-11T19:00:13.002Z"
}, {
"name" : "stderr",
"url" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/stderr",
"size" : 0,
"lastModified" : "2024-07-11T19:00:13.258Z"
}, {
"name" : "stdout",
"url" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/stdout",
"size" : 12,
"lastModified" : "2024-07-11T19:00:18.286Z"
} ]
}
6.6.5. Getting a directory as HTML
This would happen automatically if you called from browser due to browser default accept header |
6.6.6. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
text/html |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
|
The path to the directory to get |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/' -i -X GET \
-H 'Accept: text/html'
HTTPie
$ http GET 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/' \
'Accept:text/html'
Response Documentation
Headers
Name | Description |
---|---|
|
text/html |
Payload Fields
None
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/ HTTP/1.1
Accept: text/html
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
Content-Length: 2729
Date: Thu, 11 Jul 2024 19:00:18 GMT
Keep-Alive: timeout=60
Connection: keep-alive
<!DOCTYPE html><html><head><title>a110c6a7-91df-4f48-bd77-446a861304ad</title><style type="text/css"><!--body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}--></style> </head><body><h1>a110c6a7-91df-4f48-bd77-446a861304ad</h1><HR size="1" noshade="noshade"><table width="100%" cellspacing="0" cellpadding="5" align="center"><tr><td align="left"><font size="+1"><strong>Filename</strong></font></td><td align="right"><font size="+1"><strong>Size</strong></font></td><td align="right"><font size="+1"><strong>Last Modified</strong></font></td></tr><tr bgcolor="#eeeeee"><td align="left"> <a href="https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/genie"><tt>genie/</tt></a></td><td align="right"><tt>-</tt></td><td align="right"><tt>Thu, 11 Jul 2024 19:00:13 GMT</tt></td></tr><tr><td align="left"> <a href="https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/config1"><tt>config1</tt></a></td><td align="right"><tt>0 bytes</tt></td><td align="right"><tt>Thu, 11 Jul 2024 19:00:13 GMT</tt></td></tr><tr bgcolor="#eeeeee"><td align="left"> <a href="https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/dep1"><tt>dep1</tt></a></td><td align="right"><tt>0 bytes</tt></td><td align="right"><tt>Thu, 11 Jul 2024 19:00:13 GMT</tt></td></tr><tr><td align="left"> <a href="https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/genie_setup.sh"><tt>genie_setup.sh</tt></a></td><td align="right"><tt>0 bytes</tt></td><td align="right"><tt>Thu, 11 Jul 2024 19:00:13 GMT</tt></td></tr><tr bgcolor="#eeeeee"><td align="left"> <a href="https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/run"><tt>run</tt></a></td><td align="right"><tt>3 KB</tt></td><td align="right"><tt>Thu, 11 Jul 2024 19:00:13 GMT</tt></td></tr><tr><td align="left"> <a href="https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/stderr"><tt>stderr</tt></a></td><td align="right"><tt>0 bytes</tt></td><td align="right"><tt>Thu, 11 Jul 2024 19:00:13 GMT</tt></td></tr><tr bgcolor="#eeeeee"><td align="left"> <a href="https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/stdout"><tt>stdout</tt></a></td><td align="right"><tt>12 bytes</tt></td><td align="right"><tt>Thu, 11 Jul 2024 19:00:18 GMT</tt></td></tr></table><HR size="1" noshade="noshade"><h3>Apache Tomcat/9.0.82</h3></body></html>
6.6.8. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
/ |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
|
The path to the file to get |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/run' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/run'
Response Documentation
Headers
Name | Description |
---|---|
|
The content type of the file being returned |
Payload Fields
None
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output/run HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Last-Modified: Thu, 11 Jul 2024 19:00:13 GMT
Accept-Ranges: bytes
Content-Type: text/plain;charset=UTF-8
Content-Length: 3828
Date: Thu, 11 Jul 2024 19:00:19 GMT
Keep-Alive: timeout=60
Connection: keep-alive
#!/usr/bin/env bash
#
# Generated by Genie for job: a110c6a7-91df-4f48-bd77-446a861304ad
#
# Error out if any command fails
set -o errexit
# Error out if any command in a pipeline fails
set -o pipefail
# Error out if unknown variable is used
set -o nounset
# Save original stdout and stderr in fd 6 and 7
exec 6>&1
exec 7>&2
# Trap exit signals to ensure children processes are dead before returning
function handle_kill_request {
echo "Handling $1 signal" >&2
# Update trap
trap wait SIGTERM SIGINT SIGHUP
# Send SIGTERM to all children
pkill -P $$ || true
for ((iteration=1; iteration < 30; iteration++))
{
if pkill -0 -P $$ &> /dev/null;
then
echo "Waiting for children to terminate" >&2
sleep 1
else
echo "All children terminated" >&2
exit 1
fi
}
# Reaching this point means the children did not die. Kill with SIGKILL
echo "Terminating all children with SIGKILL" >&2
pkill -9 -P $$
}
trap 'handle_kill_request SIGTERM' SIGTERM
trap 'handle_kill_request SIGINT' SIGINT
trap 'handle_kill_request SIGHUP' SIGHUP
# Locally-generated environment variables
export GENIE_JOB_DIR="/tmp/genie/jobs/a110c6a7-91df-4f48-bd77-446a861304ad"
export GENIE_APPLICATION_DIR="${GENIE_JOB_DIR}/genie/applications"
export GENIE_COMMAND_DIR="${GENIE_JOB_DIR}/genie/command/cmd1"
export GENIE_CLUSTER_DIR="${GENIE_JOB_DIR}/genie/cluster/cluster1"
export __GENIE_SETUP_LOG_FILE="${GENIE_JOB_DIR}/genie/logs/setup.log"
export __GENIE_ENVIRONMENT_DUMP_FILE="${GENIE_JOB_DIR}/genie/logs/env.log"
export __GENIE_SETUP_ERROR_MARKER_FILE="${GENIE_JOB_DIR}/genie/setup_failed.txt"
# Mark the beginnig of the setup by creating a marker file
echo "The job script failed during setup. See ${__GENIE_SETUP_LOG_FILE} for details" > ${__GENIE_SETUP_ERROR_MARKER_FILE}
# During setup, redirect stdout and stderr of this script to a log file
exec > ${__GENIE_SETUP_LOG_FILE}
exec 2>&1
echo "Setup start: $(date '+%Y-%m-%d %H:%M:%S')"
# Server-provided environment variables
export GENIE_CLUSTER_ID="cluster1"
export GENIE_CLUSTER_NAME="Local laptop"
export GENIE_CLUSTER_TAGS="localhost"
export GENIE_COMMAND_ID="cmd1"
export GENIE_COMMAND_NAME="Unix Bash command"
export GENIE_COMMAND_TAGS="bash"
export GENIE_JOB_GROUPING="Workflow.Foo"
export GENIE_JOB_GROUPING_INSTANCE="Workflow.Foo_Step.Blah-2020021919:12:34.000_1"
export GENIE_JOB_ID="a110c6a7-91df-4f48-bd77-446a861304ad"
export GENIE_JOB_MEMORY="1500"
export GENIE_JOB_NAME="List * ... Directories bash job"
export GENIE_JOB_TAGS="aTag,zTag"
export GENIE_REQUESTED_CLUSTER_TAGS="[[localhost]]"
export GENIE_REQUESTED_CLUSTER_TAGS_0="localhost"
export GENIE_REQUESTED_COMMAND_TAGS="bash"
export GENIE_USER="genie"
export GENIE_USER_GROUP=""
export GENIE_VERSION="4"
echo "Sourcing setup script for cluster cluster1"
source ${GENIE_JOB_DIR}/genie/cluster/cluster1/genie_setup.sh
echo "Sourcing setup script for application app1"
source ${GENIE_JOB_DIR}/genie/applications/app1/genie_setup.sh
echo "Sourcing setup script for application app2"
source ${GENIE_JOB_DIR}/genie/applications/app2/genie_setup.sh
echo "Sourcing setup script for command cmd1"
source ${GENIE_JOB_DIR}/genie/command/cmd1/genie_setup.sh
echo "Sourcing setup script for job a110c6a7-91df-4f48-bd77-446a861304ad"
source ${GENIE_JOB_DIR}/genie_setup.sh
echo "Setup end: $(date '+%Y-%m-%d %H:%M:%S')"
# Setup completed successfully, delete marker file
rm ${__GENIE_SETUP_ERROR_MARKER_FILE}
# Restore the original stdout and stderr. Close fd 6 and 7
exec 1>&6 6>&-
exec 2>&7 7>&-
# Dump environment post-setup
env | grep -E --regex='.*' | sort > ${__GENIE_ENVIRONMENT_DUMP_FILE}
# Launch the command
/bin/bash -c 'sleep 5 && echo hello world' <&0 &
wait %1
exit $?
6.7. Get a Job Request
6.7.1. Description
Get the original request which spawned the job.
6.7.2. Endpoint
GET /api/v3/jobs/{id}/request
6.7.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/request' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/request'
Response Documentation
Headers
Name | Description |
---|---|
|
application/hal+json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
commandArgs |
String |
Any arguments to append to the command executable when the job is run |
Size must be between 0 and 10000 inclusive |
true |
clusterCriterias |
Array |
List of cluster criteria’s for which a match will be attempted with register cluster tags. Each set of tags within a given cluster criteria must have at least one non-blank (e.g. ' ', ' ', null) tag. |
Must not be empty |
false |
commandCriteria |
Array |
Set of tags which will attempt to match against the commands linked to selected cluster. There must be at least one non-blank (e.g. ' ', ' ', null) criteria within the set |
Must not be empty |
false |
group |
String |
A group that the job should be run under on the linux system |
Size must be between 0 and 255 inclusive |
true |
disableLogArchival |
Boolean |
If you want to disable backing up job output files set this to true. Default: false |
true |
|
String |
If you want e-mail notification on job completion enter address here |
Must be a well-formed email address. Size must be between 0 and 255 inclusive |
true |
|
cpu |
Number |
For future use. Currently has no impact. |
Must be at least 1 |
true |
memory |
Number |
The amount of memory (in MB) desired for job client. Cannot exceed configured max. |
Must be at least 1 |
true |
timeout |
Number |
The timeout (in seconds) after which job will be killed by system, system setting used if not set |
Must be at least 1 |
true |
configs |
Array |
URI’s of configuration files which will be downloaded into job working directory at runtime |
true |
|
dependencies |
Array |
URI’s of dependency files which will be downloaded into job working directory at runtime |
true |
|
applications |
Array |
Complete list of application ids if power user wishes to override selected command defaults |
true |
|
grouping |
String |
The grouping of the job relative to other jobs. e.g. scheduler job name |
true |
|
groupingInstance |
String |
The grouping instance of the job relative to other jobs. e.g. scheduler job run |
true |
|
runtime |
Object |
The requested job runtime values |
false |
HATEOAS Links
Relation | Description |
---|---|
|
URI for this job request |
|
The job that resulted from this request |
|
The job execution that resulted from this request |
|
The job metadata information for this job |
|
The output URI for the job |
|
The current status of the job |
HTTP Messages
Request
GET /api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/request HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 19:00:19 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 2261
{
"id" : null,
"created" : null,
"updated" : null,
"version" : "1.0",
"user" : "genie",
"name" : "List * ... Directories bash job",
"description" : "Genie 3 Test Job",
"metadata" : {
"schedulerJobName" : "7443484c-90b8-4dc3-a12c-5e75c37865c0",
"schedulerRunId" : "e3f580f7-2b8f-4ded-b092-391a9eb4f9ea"
},
"tags" : [ "aTag", "zTag" ],
"configs" : [ "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/job/config1" ],
"dependencies" : [ "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/job/dep1" ],
"setupFile" : "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/job/jobsetupfile",
"commandArgs" : "-c 'sleep 5 && echo hello world'",
"clusterCriterias" : [ {
"tags" : [ "localhost" ]
} ],
"commandCriteria" : [ "bash" ],
"group" : null,
"disableLogArchival" : false,
"email" : null,
"cpu" : null,
"memory" : null,
"timeout" : null,
"applications" : [ ],
"grouping" : "Workflow.Foo",
"groupingInstance" : "Workflow.Foo_Step.Blah-2020021919:12:34.000_1",
"runtime" : {
"resources" : {
"cpu" : null,
"gpu" : null,
"memoryMb" : null,
"diskMb" : null,
"networkMbps" : null
},
"images" : { }
},
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/request"
},
"job" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad"
},
"execution" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/execution"
},
"output" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output"
},
"status" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/status"
},
"metadata" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/metadata"
}
}
}
6.8. Get a Job Execution
6.8.1. Description
Get metadata about a job execution. Information like where a job was run, its process exit code, etc.
6.8.2. Endpoint
GET /api/v3/jobs/{id}/execution
6.8.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/execution' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/execution'
Response Documentation
Headers
Name | Description |
---|---|
|
application/hal+json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
hostName |
String |
The host name of the Genie node responsible for the job |
Size must be between 1 and 1024 inclusive |
false |
processId |
Number |
The id of the job client process on the Genie node |
true |
|
checkDelay |
Number |
The amount of time in milliseconds between checks of the job status by Genie |
Must be at least 1 |
true |
timeout |
String |
The date (UTC ISO8601 with millis) when the job will be killed by Genie due to timeout |
true |
|
exitCode |
Number |
The job client process exit code after the job is done |
true |
|
memory |
Number |
The amount of memory (in MB) allocated to the job client |
Must be at least 1 |
true |
archiveStatus |
String |
The archival status of the job directory |
true |
|
launcherExt |
Object |
JSON object that contains metadata specific to the launcher implementation for the job |
true |
|
runtime |
Object |
The runtime execution environment for a job |
false |
HATEOAS Links
Relation | Description |
---|---|
|
URI for this job execution |
|
The job associated with this execution |
|
The job request that spawned this execution |
|
The job metadata information for this job |
|
The output URI for the job |
|
The current status of the job |
HTTP Messages
Request
GET /api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/execution HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 19:00:19 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 1517
{
"id" : "a110c6a7-91df-4f48-bd77-446a861304ad",
"created" : "2024-07-11T19:00:07.352Z",
"updated" : "2024-07-11T19:00:18.516Z",
"hostName" : "fv-az1773-619.5c5iphqueiuuvdxclnr0txjlua.dx.internal.cloudapp.net",
"processId" : null,
"checkDelay" : null,
"timeout" : "2024-07-18T19:00:13.310Z",
"exitCode" : null,
"memory" : 1500,
"archiveStatus" : "ARCHIVED",
"launcherExt" : {
"launcherClass" : "com.netflix.genie.web.agent.launchers.impl.LocalAgentLauncherImpl",
"sourceHostname" : "fv-az1773-619.5c5iphqueiuuvdxclnr0txjlua.dx.internal.cloudapp.net"
},
"runtime" : {
"resources" : {
"cpu" : 1,
"gpu" : 0,
"memoryMb" : 1500,
"diskMb" : 10240,
"networkMbps" : 10000
},
"images" : { }
},
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/execution"
},
"job" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad"
},
"request" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/request"
},
"output" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output"
},
"status" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/status"
},
"metadata" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/metadata"
}
}
}
6.9. Get Job Metadata
6.9.1. Description
Get metadata about a job beyond core information. Information like where a job was submitted from, how large its output files were, etc.
6.9.2. Endpoint
GET /api/v3/jobs/{id}/metadata
6.9.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/metadata' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/metadata'
Response Documentation
Headers
Name | Description |
---|---|
|
application/hal+json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
clientHost |
String |
The host name of the client that submitted the job to Genie |
true |
|
userAgent |
String |
The user agent string that was passed to Genie on job request |
true |
|
numAttachments |
Number |
The number of attachments sent to Genie with the job request |
true |
|
totalSizeOfAttachments |
Number |
The total size of all attachments sent to Genie with the job request. In bytes. |
true |
|
stdOutSize |
Number |
The final size of the stdout file after a job is completed. In bytes. |
true |
|
stdErrSize |
Number |
The final size of the stderr file after a job is completed. In bytes. |
true |
HATEOAS Links
Relation | Description |
---|---|
|
URI for this job metadata |
|
The job associated with this execution |
|
The job request that spawned this execution |
|
The job execution information for this job |
|
The output URI for the job |
|
The current status of the job |
HTTP Messages
Request
GET /api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/metadata HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 19:00:19 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 1081
{
"id" : "a110c6a7-91df-4f48-bd77-446a861304ad",
"created" : "2024-07-11T19:00:07.352Z",
"updated" : "2024-07-11T19:00:18.516Z",
"clientHost" : "127.0.0.1",
"userAgent" : "Apache-HttpClient/4.5.14 (Java/17.0.11)",
"numAttachments" : 0,
"totalSizeOfAttachments" : 0,
"stdOutSize" : null,
"stdErrSize" : null,
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/metadata"
},
"job" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad"
},
"request" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/request"
},
"output" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/output"
},
"status" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/status"
},
"execution" : {
"href" : "https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/execution"
}
}
}
6.10. Get the Cluster a Job Ran On
6.10.1. Description
Get the metadata about the cluster which was selected to run the job based on the cluster and command criteria in the job request.
6.10.2. Endpoint
GET /api/v3/jobs/{id}/cluster
6.10.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/cluster' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/cluster'
Response Documentation
Headers
Name | Description |
---|---|
|
application/hal+json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
configs |
Array |
Any configuration files needed for the resource |
true |
|
status |
String |
The status of the cluster. Options: [UP, OUT_OF_SERVICE, TERMINATED] |
Must not be null |
false |
dependencies |
Array |
The dependencies for the cluster |
true |
HATEOAS Links
Relation | Description |
---|---|
|
URI for this cluster |
|
Get all the commands this cluster can use |
HTTP Messages
Request
GET /api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/cluster HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 19:00:19 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 1475
{
"id" : "cluster1",
"created" : "2024-07-11T19:00:07.291Z",
"updated" : "2024-07-11T19:00:07.291Z",
"version" : "1.0",
"user" : "genie",
"name" : "Local laptop",
"description" : null,
"metadata" : null,
"tags" : [ "localhost", "genie.id:cluster1", "genie.name:Local laptop" ],
"configs" : [ "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/cluster1/config2", "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/cluster1/config1" ],
"dependencies" : [ "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/cluster1/dep2", "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/cluster1/dep1" ],
"setupFile" : "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/cluster1/setupfile",
"status" : "UP",
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/clusters/cluster1"
},
"commands" : {
"href" : "https://genie.example.com/api/v3/clusters/cluster1/commands{?status}",
"templated" : true
}
}
}
6.11. Get the Command a Job Executed
6.11.1. Description
Get the metadata about the command which was selected to be executed by the job based on the cluster and command criteria in the job request.
6.11.2. Endpoint
GET /api/v3/jobs/{id}/command
6.11.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/command' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/command'
Response Documentation
Headers
Name | Description |
---|---|
|
application/hal+json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
configs |
Array |
Any configuration files needed for the resource |
true |
|
status |
String |
The status of the command. Options: [ACTIVE, DEPRECATED, INACTIVE] |
Must not be null |
false |
executable |
String |
The executable to run on the Genie node when this command is used. e.g. /usr/bin/hadoop |
Must not be empty. Size must be between 0 and 1024 inclusive |
false |
executableAndArguments |
Array |
The executable and arguments to run on the Genie node when this command is used. e.g. /usr/bin/hadoop |
Must not be empty |
false |
checkDelay |
Number |
Deprecated as of 4.3.0. Now is a no-op on the server side. |
false |
|
memory |
Number |
The default amount of memory (in MB) that should be allocated for instances of this command client |
Must be at least 1 |
true |
dependencies |
Array |
The dependencies for the command |
true |
|
clusterCriteria |
Array |
The priority ordered list of criteria to resolve clusters that this command can run jobs on |
true |
|
runtime |
Object |
The various job runtime parameters that should be used if this command is used |
false |
HATEOAS Links
Relation | Description |
---|---|
|
URI for this command |
|
Get all the applications this command depends on |
|
Get all clusters this command is available on |
HTTP Messages
Request
GET /api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/command HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 19:00:19 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 2177
{
"id" : "cmd1",
"created" : "2024-07-11T19:00:07.308Z",
"updated" : "2024-07-11T19:00:07.328Z",
"version" : "1.0",
"user" : "genie",
"name" : "Unix Bash command",
"description" : null,
"metadata" : null,
"tags" : [ "genie.name:Unix Bash command", "bash", "genie.id:cmd1" ],
"configs" : [ "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/cmd1/config2", "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/cmd1/config1", "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/cmd1/GB18030.txt" ],
"dependencies" : [ "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/cluster1/dep2", "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/cluster1/dep1" ],
"setupFile" : "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/cmd1/setupfile",
"status" : "ACTIVE",
"executable" : "/bin/bash",
"executableAndArguments" : [ "/bin/bash" ],
"checkDelay" : 10000,
"memory" : null,
"clusterCriteria" : [ {
"id" : null,
"name" : null,
"version" : null,
"status" : null,
"tags" : [ "localhost" ]
} ],
"runtime" : {
"resources" : {
"cpu" : null,
"gpu" : null,
"memoryMb" : null,
"diskMb" : null,
"networkMbps" : null
},
"images" : { }
},
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/commands/cmd1"
},
"applications" : {
"href" : "https://genie.example.com/api/v3/commands/cmd1/applications"
},
"clusters" : {
"href" : "https://genie.example.com/api/v3/commands/cmd1/clusters{?status}",
"templated" : true
}
}
}
6.12. Get the Applications a Job Command Used
6.12.1. Description
Get the list of applications that were used by the command selected by job to execute.
6.12.2. Endpoint
GET /api/v3/jobs/{id}/applications
6.12.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/applications' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/applications'
Response Documentation
Headers
Name | Description |
---|---|
|
application/hal+json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
The applications for the job |
false |
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/jobs/a110c6a7-91df-4f48-bd77-446a861304ad/applications HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 19:00:19 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 2874
[ {
"id" : "app1",
"created" : "2024-07-11T19:00:07.255Z",
"updated" : "2024-07-11T19:00:07.255Z",
"version" : "1.0",
"user" : "genie",
"name" : "Application 1",
"description" : null,
"metadata" : null,
"tags" : [ "genie.id:app1", "genie.name:Application 1" ],
"configs" : [ "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/app1/config2", "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/app1/config1" ],
"dependencies" : [ "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/app1/dep2", "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/app1/dep1" ],
"setupFile" : "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/app1/setupfile",
"status" : "ACTIVE",
"type" : null,
"links" : [ {
"rel" : "self",
"href" : "https://genie.example.com/api/v3/applications/app1"
}, {
"rel" : "commands",
"href" : "https://genie.example.com/api/v3/applications/app1/commands{?status}"
} ]
}, {
"id" : "app2",
"created" : "2024-07-11T19:00:07.273Z",
"updated" : "2024-07-11T19:00:07.273Z",
"version" : "1.0",
"user" : "genie",
"name" : "Application 2",
"description" : null,
"metadata" : null,
"tags" : [ "genie.id:app2", "genie.name:Application 2" ],
"configs" : [ "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/app2/config1", "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/app2/config2" ],
"dependencies" : [ "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/app2/dep1", "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/app2/dep2" ],
"setupFile" : "file:/home/runner/work/genie/genie/genie-web/build/resources/integTest/com/netflix/genie/web/apis/rest/v3/controllers/JobRestControllerIntegrationTests/app2/setupfile",
"status" : "ACTIVE",
"type" : null,
"links" : [ {
"rel" : "self",
"href" : "https://genie.example.com/api/v3/applications/app2"
}, {
"rel" : "commands",
"href" : "https://genie.example.com/api/v3/applications/app2/commands{?status}"
} ]
} ]
7. Applications API
7.1. Create an Application
7.1.1. Description
Create a new application in the system.
7.1.2. Endpoint
POST /api/v3/applications
The id in this example is optional. If you include one Genie will use it. If not it will provide one. If you provide one it must be unique. |
7.1.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
None
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
configs |
Array |
Any configuration files needed for the resource |
true |
|
type |
String |
The type of application this is (e.g. hadoop, presto, spark). Can be used to group. |
true |
|
status |
String |
The status of the application. Options: [ACTIVE, DEPRECATED, INACTIVE] |
Must not be null |
false |
dependencies |
Array |
The dependencies for the application |
true |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications' -i -X POST \
-H 'Content-Type: application/json' \
-d '{
"id" : null,
"created" : null,
"updated" : null,
"version" : "1.5.1",
"user" : "genie",
"name" : "spark",
"description" : "Spark for Genie",
"metadata" : null,
"tags" : [ "type:spark", "ver:1.5.1" ],
"configs" : [ "s3://mybucket/spark/1.5.1/spark-env.sh" ],
"dependencies" : [ "s3://mybucket/spark/1.5.1/spark.tar.gz" ],
"setupFile" : "s3://mybucket/spark/1.5.1/setupBase-spark.sh",
"status" : "ACTIVE",
"type" : "spark"
}'
HTTPie
$ echo '{
"id" : null,
"created" : null,
"updated" : null,
"version" : "1.5.1",
"user" : "genie",
"name" : "spark",
"description" : "Spark for Genie",
"metadata" : null,
"tags" : [ "type:spark", "ver:1.5.1" ],
"configs" : [ "s3://mybucket/spark/1.5.1/spark-env.sh" ],
"dependencies" : [ "s3://mybucket/spark/1.5.1/spark.tar.gz" ],
"setupFile" : "s3://mybucket/spark/1.5.1/setupBase-spark.sh",
"status" : "ACTIVE",
"type" : "spark"
}' | http POST 'https://genie.example.com/api/v3/applications' \
'Content-Type:application/json'
Response Documentation
Headers
Name | Description |
---|---|
|
The URI |
Payload Fields
None
HATEOAS Links
None
HTTP Messages
Request
POST /api/v3/applications HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 452
{
"id" : null,
"created" : null,
"updated" : null,
"version" : "1.5.1",
"user" : "genie",
"name" : "spark",
"description" : "Spark for Genie",
"metadata" : null,
"tags" : [ "type:spark", "ver:1.5.1" ],
"configs" : [ "s3://mybucket/spark/1.5.1/spark-env.sh" ],
"dependencies" : [ "s3://mybucket/spark/1.5.1/spark.tar.gz" ],
"setupFile" : "s3://mybucket/spark/1.5.1/setupBase-spark.sh",
"status" : "ACTIVE",
"type" : "spark"
}
Response
HTTP/1.1 201 Created
Location: https://genie.example.com/api/v3/applications/53a0d43f-2e63-43ec-8312-04e7235e711f
Date: Thu, 11 Jul 2024 18:59:33 GMT
Keep-Alive: timeout=60
Connection: keep-alive
7.2. Get an Application
7.2.1. Description
Get the metadata about an application in the system.
7.2.2. Endpoint
GET /api/v3/applications/{id}
7.2.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/53a0d43f-2e63-43ec-8312-04e7235e711f' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/applications/53a0d43f-2e63-43ec-8312-04e7235e711f'
Response Documentation
Headers
Name | Description |
---|---|
|
application/hal+json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
configs |
Array |
Any configuration files needed for the resource |
true |
|
type |
String |
The type of application this is (e.g. hadoop, presto, spark). Can be used to group. |
true |
|
status |
String |
The status of the application. Options: [ACTIVE, DEPRECATED, INACTIVE] |
Must not be null |
false |
dependencies |
Array |
The dependencies for the application |
true |
HATEOAS Links
Relation | Description |
---|---|
|
URI for this application |
|
Get all the commands using this application |
HTTP Messages
Request
GET /api/v3/applications/53a0d43f-2e63-43ec-8312-04e7235e711f HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:33 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 910
{
"id" : "53a0d43f-2e63-43ec-8312-04e7235e711f",
"created" : "2024-07-11T18:59:34.634Z",
"updated" : "2024-07-11T18:59:34.634Z",
"version" : "1.5.1",
"user" : "genie",
"name" : "spark",
"description" : "Spark for Genie",
"metadata" : null,
"tags" : [ "genie.id:53a0d43f-2e63-43ec-8312-04e7235e711f", "type:spark", "ver:1.5.1", "genie.name:spark" ],
"configs" : [ "s3://mybucket/spark/1.5.1/spark-env.sh" ],
"dependencies" : [ "s3://mybucket/spark/1.5.1/spark.tar.gz" ],
"setupFile" : "s3://mybucket/spark/1.5.1/setupBase-spark.sh",
"status" : "ACTIVE",
"type" : "spark",
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/applications/53a0d43f-2e63-43ec-8312-04e7235e711f"
},
"commands" : {
"href" : "https://genie.example.com/api/v3/applications/53a0d43f-2e63-43ec-8312-04e7235e711f/commands{?status}",
"templated" : true
}
}
}
7.3. Find Applications
7.3.1. Description
Find applications using various query parameters.
7.3.2. Endpoint
GET /api/v3/applications
7.3.3. API Docs
Request Documentation
Headers
None
Path Parameters
None
Query Parameters
Parameter | Description |
---|---|
|
The page number to get. Default to 0. |
|
The size of the page to get. Default to 64. |
|
The fields to sort the results by. Defaults to 'updated,desc'. |
|
The name of the applications to find. Use % to perform a regex like query |
|
The user of the applications to find. Use % to perform a regex like query |
|
The status(es) of the applications to find. Can have multiple. Options: [ACTIVE, DEPRECATED, INACTIVE] |
|
The tag(s) of the applications to find. Can have multiple. |
|
The type of the applications to find. Use % to perform a regex like query |
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications?status=ACTIVE&status=DEPRECATED&status=%5BACTIVE%2C+DEPRECATED%5D' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/applications?status=ACTIVE&status=DEPRECATED&status=%5BACTIVE%2C+DEPRECATED%5D'
Response Documentation
Headers
Name | Description |
---|---|
|
application/hal+json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
_links |
Object |
Links to other resources. |
false |
|
page |
Object |
The result page information. |
false |
|
page.size |
Number |
The number of elements in this page result. |
false |
|
page.totalElements |
Number |
The total number of elements this search result could return. |
false |
|
page.totalPages |
Number |
The total number of pages there could be at the current page size. |
false |
|
page.number |
Number |
The current page number. |
false |
|
_embedded.applicationList |
Array |
The found applications. |
false |
HATEOAS Links
Relation | Description |
---|---|
|
The current search |
|
The first page for this search |
|
The previous page for this search |
|
The next page for this search |
|
The last page for this search |
HTTP Messages
Request
GET /api/v3/applications?status=ACTIVE&status=DEPRECATED&status=%5BACTIVE%2C+DEPRECATED%5D HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:32 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 6406
{
"_embedded" : {
"applicationList" : [ {
"id" : "6609e6fc-fdd4-4c09-b3f2-76a02ea8eecc",
"created" : "2024-07-11T18:59:32.741Z",
"updated" : "2024-07-11T18:59:32.741Z",
"version" : "1.0.0",
"user" : "genieUser7",
"name" : "hive",
"description" : "Hive 1.0.0 for Genie",
"metadata" : null,
"tags" : [ "type:hive", "genie.name:hive", "ver:1.0.0", "genie.id:6609e6fc-fdd4-4c09-b3f2-76a02ea8eecc" ],
"configs" : [ "s3://mybucket/hive/hive-env.sh", "s3://mybucket/hive/hive-log4j.properties" ],
"dependencies" : [ "s3://mybucket/hive/hive-1.0.0.tar.gz" ],
"setupFile" : "s3://mybucket/hive/setupBase-hive.sh",
"status" : "ACTIVE",
"type" : "hive",
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/applications/6609e6fc-fdd4-4c09-b3f2-76a02ea8eecc"
},
"commands" : {
"href" : "https://genie.example.com/api/v3/applications/6609e6fc-fdd4-4c09-b3f2-76a02ea8eecc/commands{?status}",
"templated" : true
}
}
}, {
"id" : "0a6f0710-c715-4da9-b92b-81a84cbb4b38",
"created" : "2024-07-11T18:59:32.686Z",
"updated" : "2024-07-11T18:59:32.686Z",
"version" : "0.4.0",
"user" : "genieUser6",
"name" : "spark",
"description" : "Pig 0.15.0 for Genie",
"metadata" : null,
"tags" : [ "genie.id:0a6f0710-c715-4da9-b92b-81a84cbb4b38", "ver:0.15.0", "type:pig", "genie.name:spark" ],
"configs" : [ "s3://mybucket/pig/pig.properties" ],
"dependencies" : [ "s3://mybucket/pig/pig-0.15.0.tar.gz" ],
"setupFile" : "s3://mybucket/pig/setupBase-pig.sh",
"status" : "ACTIVE",
"type" : "pig",
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/applications/0a6f0710-c715-4da9-b92b-81a84cbb4b38"
},
"commands" : {
"href" : "https://genie.example.com/api/v3/applications/0a6f0710-c715-4da9-b92b-81a84cbb4b38/commands{?status}",
"templated" : true
}
}
}, {
"id" : "4d217fe8-73ed-4073-943d-d6eb34801474",
"created" : "2024-07-11T18:59:32.640Z",
"updated" : "2024-07-11T18:59:32.640Z",
"version" : "1.3.1",
"user" : "genieUser5",
"name" : "spark",
"description" : "Spark 1.3.1 for Genie",
"metadata" : null,
"tags" : [ "genie.id:4d217fe8-73ed-4073-943d-d6eb34801474", "type:spark", "ver:1.3.1", "genie.name:spark" ],
"configs" : [ "s3://mybucket/spark/spark-env.sh" ],
"dependencies" : [ "s3://mybucket/spark/spark-1.3.1.tar.gz" ],
"setupFile" : "s3://mybucket/spark/setupBase-spark.sh",
"status" : "DEPRECATED",
"type" : "spark",
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/applications/4d217fe8-73ed-4073-943d-d6eb34801474"
},
"commands" : {
"href" : "https://genie.example.com/api/v3/applications/4d217fe8-73ed-4073-943d-d6eb34801474/commands{?status}",
"templated" : true
}
}
}, {
"id" : "e38059b3-2020-4281-8a1c-3da6536756dd",
"created" : "2024-07-11T18:59:32.604Z",
"updated" : "2024-07-11T18:59:32.604Z",
"version" : "1.4.0",
"user" : "genieUser4",
"name" : "spark",
"description" : "Spark 1.4.0 for Genie",
"metadata" : null,
"tags" : [ "type:spark", "ver:1.4.0", "genie.id:e38059b3-2020-4281-8a1c-3da6536756dd", "genie.name:spark" ],
"configs" : [ "s3://mybucket/spark/spark-env.sh" ],
"dependencies" : [ "s3://mybucket/spark/spark-1.4.0.tar.gz" ],
"setupFile" : "s3://mybucket/spark/setupBase-spark.sh",
"status" : "DEPRECATED",
"type" : "spark",
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/applications/e38059b3-2020-4281-8a1c-3da6536756dd"
},
"commands" : {
"href" : "https://genie.example.com/api/v3/applications/e38059b3-2020-4281-8a1c-3da6536756dd/commands{?status}",
"templated" : true
}
}
}, {
"id" : "76f7283d-6ce8-4c40-9fdb-c967b8af54a8",
"created" : "2024-07-11T18:59:32.531Z",
"updated" : "2024-07-11T18:59:32.531Z",
"version" : "1.5.0",
"user" : "genieUser2",
"name" : "spark",
"description" : "Spark 1.5.0 for Genie",
"metadata" : null,
"tags" : [ "type:spark", "genie.id:76f7283d-6ce8-4c40-9fdb-c967b8af54a8", "ver:1.5.0", "genie.name:spark" ],
"configs" : [ "s3://mybucket/spark/spark-env.sh" ],
"dependencies" : [ "s3://mybucket/spark/spark-1.5.0.tar.gz" ],
"setupFile" : "s3://mybucket/spark/setupBase-spark.sh",
"status" : "ACTIVE",
"type" : "spark",
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/applications/76f7283d-6ce8-4c40-9fdb-c967b8af54a8"
},
"commands" : {
"href" : "https://genie.example.com/api/v3/applications/76f7283d-6ce8-4c40-9fdb-c967b8af54a8/commands{?status}",
"templated" : true
}
}
}, {
"id" : "3c72dc2d-a16c-45bf-bfcf-3149bd456161",
"created" : "2024-07-11T18:59:32.471Z",
"updated" : "2024-07-11T18:59:32.471Z",
"version" : "1.5.1",
"user" : "genieUser1",
"name" : "spark",
"description" : "Spark 1.5.1 for Genie",
"metadata" : null,
"tags" : [ "genie.id:3c72dc2d-a16c-45bf-bfcf-3149bd456161", "type:spark", "ver:1.5.1", "genie.name:spark" ],
"configs" : [ "s3://mybucket/spark/spark-env.sh" ],
"dependencies" : [ "s3://mybucket/spark/spark-1.5.1.tar.gz" ],
"setupFile" : "s3://mybucket/spark/setupBase-spark.sh",
"status" : "ACTIVE",
"type" : "spark",
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/applications/3c72dc2d-a16c-45bf-bfcf-3149bd456161"
},
"commands" : {
"href" : "https://genie.example.com/api/v3/applications/3c72dc2d-a16c-45bf-bfcf-3149bd456161/commands{?status}",
"templated" : true
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/applications?status=ACTIVE&status=DEPRECATED{&name,user,tag,type}",
"templated" : true
}
},
"page" : {
"size" : 10,
"totalElements" : 6,
"totalPages" : 1,
"number" : 0
}
}
7.4. Update an Entire Application
7.4.1. Description
Update the metadata about an application. This method does a complete replace of the resource. Usual flow is to call to get the most recent state then update what you want and call this API with the result.
For more fine grained control call the PATCH API. |
7.4.2. Endpoint
PUT /api/v3/applications/{id}
7.4.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
configs |
Array |
Any configuration files needed for the resource |
true |
|
type |
String |
The type of application this is (e.g. hadoop, presto, spark). Can be used to group. |
true |
|
status |
String |
The status of the application. Options: [ACTIVE, DEPRECATED, INACTIVE] |
Must not be null |
false |
dependencies |
Array |
The dependencies for the application |
true |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7' -i -X PUT \
-H 'Content-Type: application/json' \
-d '{
"id" : "850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7",
"created" : "2024-07-11T18:59:35.590Z",
"updated" : "2024-07-11T18:59:35.590Z",
"version" : "1.5.1",
"user" : "genie",
"name" : "spark",
"description" : null,
"metadata" : null,
"tags" : [ "genie.id:850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7", "genie.name:spark" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "INACTIVE",
"type" : null
}'
HTTPie
$ echo '{
"id" : "850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7",
"created" : "2024-07-11T18:59:35.590Z",
"updated" : "2024-07-11T18:59:35.590Z",
"version" : "1.5.1",
"user" : "genie",
"name" : "spark",
"description" : null,
"metadata" : null,
"tags" : [ "genie.id:850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7", "genie.name:spark" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "INACTIVE",
"type" : null
}' | http PUT 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7' \
'Content-Type:application/json'
HTTP Messages
Request
PUT /api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7 HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 508
{
"id" : "850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7",
"created" : "2024-07-11T18:59:35.590Z",
"updated" : "2024-07-11T18:59:35.590Z",
"version" : "1.5.1",
"user" : "genie",
"name" : "spark",
"description" : null,
"metadata" : null,
"tags" : [ "genie.id:850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7", "genie.name:spark" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "INACTIVE",
"type" : null
}
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:35 GMT
Keep-Alive: timeout=60
Connection: keep-alive
7.5. Update Parts of an Application
7.5.1. Description
Update the metadata about an application using JSON Patch. This will ONLY update the fields you request be changed.
For more information about JSON Patch RFC see the website. |
7.5.2. Endpoint
PATCH /api/v3/applications/{id}
7.5.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of patches to apply |
false |
|
[].op |
String |
Patch operation to perform. |
add, remove, replace, copy, move, test |
false |
[].path |
String |
The json path to operate on. e.g. /user |
false |
|
[].from |
String |
The json path to move or copy from. e.g. /user |
true |
|
[].value |
String |
The json value to put at the path for an add, replace or test |
true |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7' -i -X PATCH \
-H 'Content-Type: application/json' \
-d '[ {
"op" : "replace",
"path" : "/user",
"value" : "6e516483-fcda-41aa-808b-b9f03eb7eb72"
} ]'
HTTPie
$ echo '[ {
"op" : "replace",
"path" : "/user",
"value" : "6e516483-fcda-41aa-808b-b9f03eb7eb72"
} ]' | http PATCH 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7' \
'Content-Type:application/json'
HTTP Messages
Request
PATCH /api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7 HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 98
[ {
"op" : "replace",
"path" : "/user",
"value" : "6e516483-fcda-41aa-808b-b9f03eb7eb72"
} ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:31 GMT
Keep-Alive: timeout=60
Connection: keep-alive
7.6. Delete All Applications
7.6.1. Description
Delete all the applications currently stored in the system.
7.6.2. Endpoint
DELETE /api/v3/applications
7.6.3. API Docs
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/applications'
HTTP Messages
Request
DELETE /api/v3/applications HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:35 GMT
Keep-Alive: timeout=60
Connection: keep-alive
7.7. Delete an Application
7.7.1. Description
Delete an application currently configured in the system.
7.7.2. Endpoint
DELETE /api/v3/applications/{id}
7.7.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/e60c0af6-9e9e-4601-9c48-6de380408ef2' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/applications/e60c0af6-9e9e-4601-9c48-6de380408ef2'
HTTP Messages
Request
DELETE /api/v3/applications/e60c0af6-9e9e-4601-9c48-6de380408ef2 HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:35 GMT
Keep-Alive: timeout=60
Connection: keep-alive
7.8. Get Configs for Application
7.8.1. Description
Get the configuration file locations for an application.
7.8.2. Endpoint
GET /api/v3/applications/{id}/configs
7.8.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/configs' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/configs'
Response Documentation
Headers
Name | Description |
---|---|
|
application/json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of configuration file locations |
false |
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/configs HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:36 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 82
[ "aa42d0cc-5ecc-4df7-a2ca-20cc5d9443c4", "7eeddb56-96e1-48ae-aba8-e2d0fca4f7ce" ]
7.9. Add Configs to Application
7.9.1. Description
Add configuration file locations to an existing application. Configurations are stored as a set so any duplicates will be ignored.
7.9.2. Endpoint
POST /api/v3/applications/{id}/configs
7.9.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of configuration file locations |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/configs' -i -X POST \
-H 'Content-Type: application/json' \
-d '[ "7eeddb56-96e1-48ae-aba8-e2d0fca4f7ce", "aa42d0cc-5ecc-4df7-a2ca-20cc5d9443c4" ]'
HTTPie
$ echo '[ "7eeddb56-96e1-48ae-aba8-e2d0fca4f7ce", "aa42d0cc-5ecc-4df7-a2ca-20cc5d9443c4" ]' | http POST 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/configs' \
'Content-Type:application/json'
HTTP Messages
Request
POST /api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/configs HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 82
[ "7eeddb56-96e1-48ae-aba8-e2d0fca4f7ce", "aa42d0cc-5ecc-4df7-a2ca-20cc5d9443c4" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:36 GMT
Keep-Alive: timeout=60
Connection: keep-alive
7.10. Update Configs for an Application
7.10.1. Description
Update the configuration file locations for an existing application. Stored as a set so duplicates are ignored.
7.10.2. Endpoint
PUT /api/v3/applications/{id}/configs
7.10.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of configuration file locations |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/configs' -i -X PUT \
-H 'Content-Type: application/json' \
-d '[ "89df674c-1ff7-422d-8ed3-9a7f970c3dbb" ]'
HTTPie
$ echo '[ "89df674c-1ff7-422d-8ed3-9a7f970c3dbb" ]' | http PUT 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/configs' \
'Content-Type:application/json'
HTTP Messages
Request
PUT /api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/configs HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 42
[ "89df674c-1ff7-422d-8ed3-9a7f970c3dbb" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:35 GMT
Keep-Alive: timeout=60
Connection: keep-alive
7.11. Remove All Configs From an Application
7.11.1. Description
Remove all the configuration file locations for an existing application.
7.11.2. Endpoint
DELETE /api/v3/applications/{id}/configs
7.11.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/configs' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/configs'
HTTP Messages
Request
DELETE /api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/configs HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:36 GMT
Keep-Alive: timeout=60
Connection: keep-alive
7.12. Get Dependencies For an Application
7.12.1. Description
Get the dependency file locations for an application.
7.12.2. Endpoint
GET /api/v3/applications/{id}/dependencies
7.12.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/dependencies' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/dependencies'
Response Documentation
Headers
Name | Description |
---|---|
|
application/json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of dependency file locations |
false |
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/dependencies HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:35 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 82
[ "ad18a477-e9ec-4e94-93b1-b23659dfbed0", "d7d472e9-cbcf-4f4d-b37f-74d3fd8e21f7" ]
7.13. Add Dependencies to Application
7.13.1. Description
Add dependency file locations to an existing application. Stored as a set so all duplicates are ignored.
7.13.2. Endpoint
POST /api/v3/applications/{id}/dependencies
7.13.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of dependency file locations |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/dependencies' -i -X POST \
-H 'Content-Type: application/json' \
-d '[ "d7d472e9-cbcf-4f4d-b37f-74d3fd8e21f7", "ad18a477-e9ec-4e94-93b1-b23659dfbed0" ]'
HTTPie
$ echo '[ "d7d472e9-cbcf-4f4d-b37f-74d3fd8e21f7", "ad18a477-e9ec-4e94-93b1-b23659dfbed0" ]' | http POST 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/dependencies' \
'Content-Type:application/json'
HTTP Messages
Request
POST /api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/dependencies HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 82
[ "d7d472e9-cbcf-4f4d-b37f-74d3fd8e21f7", "ad18a477-e9ec-4e94-93b1-b23659dfbed0" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:35 GMT
Keep-Alive: timeout=60
Connection: keep-alive
7.14. Update Dependencies for an Application
7.14.1. Description
Update the dependency file locations for an existing application
7.14.2. Endpoint
PUT /api/v3/applications/{id}/dependencies
7.14.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of dependency file locations |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/dependencies' -i -X PUT \
-H 'Content-Type: application/json' \
-d '[ "1bfcb50c-eeef-424f-8a1f-2903db872dec" ]'
HTTPie
$ echo '[ "1bfcb50c-eeef-424f-8a1f-2903db872dec" ]' | http PUT 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/dependencies' \
'Content-Type:application/json'
HTTP Messages
Request
PUT /api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/dependencies HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 42
[ "1bfcb50c-eeef-424f-8a1f-2903db872dec" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:36 GMT
Keep-Alive: timeout=60
Connection: keep-alive
7.15. Remove All Dependencies From an Application
7.15.1. Description
Remove all the dependency file locations for an existing application.
7.15.2. Endpoint
DELETE /api/v3/applications/{id}/dependencies
7.15.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/dependencies' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/dependencies'
HTTP Messages
Request
DELETE /api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/dependencies HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:36 GMT
Keep-Alive: timeout=60
Connection: keep-alive
7.16. Get Tags For an Application
7.16.1. Description
Get the tags for an application.
7.16.2. Endpoint
GET /api/v3/applications/{id}/tags
7.16.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/tags' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/tags'
Response Documentation
Headers
Name | Description |
---|---|
|
application/json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of tags |
false |
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/tags HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:35 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 188
[ "3867358c-366c-455f-9da3-ddcadc0a5bd4", "4efffba0-5728-4fa1-842e-46796f3f7e92", "genie.id:850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7", "genie.name:spark" ]
7.17. Add Tags to Application
7.17.1. Description
Add tags to an existing application. Stored as a set so all duplicates are ignored.
genie.id:{id} and genie.name:{name} tags are automatically added by the service.
|
7.17.2. Endpoint
POST /api/v3/applications/{id}/tags
7.17.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of tags |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/tags' -i -X POST \
-H 'Content-Type: application/json' \
-d '[ "4efffba0-5728-4fa1-842e-46796f3f7e92", "3867358c-366c-455f-9da3-ddcadc0a5bd4" ]'
HTTPie
$ echo '[ "4efffba0-5728-4fa1-842e-46796f3f7e92", "3867358c-366c-455f-9da3-ddcadc0a5bd4" ]' | http POST 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/tags' \
'Content-Type:application/json'
HTTP Messages
Request
POST /api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/tags HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 82
[ "4efffba0-5728-4fa1-842e-46796f3f7e92", "3867358c-366c-455f-9da3-ddcadc0a5bd4" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:35 GMT
Keep-Alive: timeout=60
Connection: keep-alive
7.18. Update Tags for an Application
7.18.1. Description
Update the tags for an existing application.
The genie.id:{id} and genie.name:{name} tags can’t be removed. They will automatically be added back
by the system.
|
7.18.2. Endpoint
PUT /api/v3/applications/{id}/tags
7.18.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of tags |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/tags' -i -X PUT \
-H 'Content-Type: application/json' \
-d '[ "69e85434-3b09-464c-8752-d85bde860954" ]'
HTTPie
$ echo '[ "69e85434-3b09-464c-8752-d85bde860954" ]' | http PUT 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/tags' \
'Content-Type:application/json'
HTTP Messages
Request
PUT /api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/tags HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 42
[ "69e85434-3b09-464c-8752-d85bde860954" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:33 GMT
Keep-Alive: timeout=60
Connection: keep-alive
7.19. Remove All Tags From Application
7.19.1. Description
Remove all the tags for an existing application
The genie.id:{id} and genie.name:{name} tags will NOT be removed by this operation
|
7.19.2. Endpoint
DELETE /api/v3/applications/{id}/tags
7.19.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/tags' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/tags'
HTTP Messages
Request
DELETE /api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/tags HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:36 GMT
Keep-Alive: timeout=60
Connection: keep-alive
7.20. Remove Tag From Application
7.20.1. Description
Remove a tag from an existing application.
You can’t remove the genie.id:{id} and genie.name:{name} tags. They will just be added back by the system
|
7.20.2. Endpoint
DELETE /api/v3/applications/{id}/tags/{tag}
7.20.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
|
The tag to remove |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/tags/04ff7f3c-dde9-4768-8a97-b05767012c53' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/tags/04ff7f3c-dde9-4768-8a97-b05767012c53'
HTTP Messages
Request
DELETE /api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/tags/04ff7f3c-dde9-4768-8a97-b05767012c53 HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:33 GMT
Keep-Alive: timeout=60
Connection: keep-alive
7.21. Get the Commands that Use an Application
7.21.1. Description
Search the commands that use the given application.
7.21.2. Endpoint
GET /api/v3/applications/{id}/commands
7.21.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
Parameter | Description |
---|---|
|
The status of commands to search for |
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/commands?status=ACTIVE&status=INACTIVE&status=%5BACTIVE%2C+INACTIVE%5D' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/commands?status=ACTIVE&status=INACTIVE&status=%5BACTIVE%2C+INACTIVE%5D'
Response Documentation
Headers
Name | Description |
---|---|
|
application/hal+json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
The list of commands found |
false |
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/applications/850109d1-8824-4e64-9ee4-eecea83322ca.810d3bb4-3099-4acb-bca9-545d60eaaaa7/commands?status=ACTIVE&status=INACTIVE&status=%5BACTIVE%2C+INACTIVE%5D HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:36 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 1283
[ {
"id" : "06b367fe-264e-45a0-8e81-9444abd925e5",
"created" : "2024-07-11T18:59:35.987Z",
"updated" : "2024-07-11T18:59:36.056Z",
"version" : "7228ec85-2a16-480e-b971-e6d4854dcc7a",
"user" : "7228ec85-2a16-480e-b971-e6d4854dcc7a",
"name" : "7228ec85-2a16-480e-b971-e6d4854dcc7a",
"description" : null,
"metadata" : null,
"tags" : [ "genie.id:06b367fe-264e-45a0-8e81-9444abd925e5", "genie.name:7228ec85-2a16-480e-b971-e6d4854dcc7a" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "ACTIVE",
"executable" : "bash",
"executableAndArguments" : [ "bash" ],
"checkDelay" : 10000,
"memory" : null,
"clusterCriteria" : [ ],
"runtime" : {
"resources" : {
"cpu" : null,
"gpu" : null,
"memoryMb" : null,
"diskMb" : null,
"networkMbps" : null
},
"images" : { }
},
"links" : [ {
"rel" : "self",
"href" : "https://genie.example.com/api/v3/commands/06b367fe-264e-45a0-8e81-9444abd925e5"
}, {
"rel" : "applications",
"href" : "https://genie.example.com/api/v3/commands/06b367fe-264e-45a0-8e81-9444abd925e5/applications"
}, {
"rel" : "clusters",
"href" : "https://genie.example.com/api/v3/commands/06b367fe-264e-45a0-8e81-9444abd925e5/clusters{?status}"
} ]
} ]
8. Clusters API
8.1. Create a Cluster
8.1.1. Description
Create a new cluster in the system.
8.1.2. Endpoint
POST /api/v3/clusters
The id in this example is optional. If you include one Genie will use it. If not it will provide one. If you provide one it must be unique. |
8.1.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
None
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
configs |
Array |
Any configuration files needed for the resource |
true |
|
status |
String |
The status of the cluster. Options: [UP, OUT_OF_SERVICE, TERMINATED] |
Must not be null |
false |
dependencies |
Array |
The dependencies for the cluster |
true |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters' -i -X POST \
-H 'Content-Type: application/json' \
-d '{
"id" : null,
"created" : null,
"updated" : null,
"version" : "2.7.1",
"user" : "genie",
"name" : "h2prod",
"description" : null,
"metadata" : null,
"tags" : [ ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "UP"
}'
HTTPie
$ echo '{
"id" : null,
"created" : null,
"updated" : null,
"version" : "2.7.1",
"user" : "genie",
"name" : "h2prod",
"description" : null,
"metadata" : null,
"tags" : [ ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "UP"
}' | http POST 'https://genie.example.com/api/v3/clusters' \
'Content-Type:application/json'
Response Documentation
Headers
Name | Description |
---|---|
|
The URI |
Payload Fields
None
HATEOAS Links
None
HTTP Messages
Request
POST /api/v3/clusters HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 266
{
"id" : null,
"created" : null,
"updated" : null,
"version" : "2.7.1",
"user" : "genie",
"name" : "h2prod",
"description" : null,
"metadata" : null,
"tags" : [ ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "UP"
}
Response
HTTP/1.1 201 Created
Location: https://genie.example.com/api/v3/clusters/046a1807-6612-4318-bf34-d6397fcdbf4e
Date: Thu, 11 Jul 2024 18:59:37 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.2. Get a Cluster
8.2.1. Description
Get the metadata about a cluster in the system.
8.2.2. Endpoint
GET /api/v3/clusters/{id}
8.2.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/046a1807-6612-4318-bf34-d6397fcdbf4e' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/clusters/046a1807-6612-4318-bf34-d6397fcdbf4e'
Response Documentation
Headers
Name | Description |
---|---|
|
application/hal+json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
configs |
Array |
Any configuration files needed for the resource |
true |
|
status |
String |
The status of the cluster. Options: [UP, OUT_OF_SERVICE, TERMINATED] |
Must not be null |
false |
dependencies |
Array |
The dependencies for the cluster |
true |
HATEOAS Links
Relation | Description |
---|---|
|
URI for this cluster |
|
Get all the commands this cluster can use |
HTTP Messages
Request
GET /api/v3/clusters/046a1807-6612-4318-bf34-d6397fcdbf4e HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:37 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 716
{
"id" : "046a1807-6612-4318-bf34-d6397fcdbf4e",
"created" : "2024-07-11T18:59:37.092Z",
"updated" : "2024-07-11T18:59:37.092Z",
"version" : "2.7.1",
"user" : "genie",
"name" : "h2prod",
"description" : null,
"metadata" : null,
"tags" : [ "genie.id:046a1807-6612-4318-bf34-d6397fcdbf4e", "genie.name:h2prod" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "UP",
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/clusters/046a1807-6612-4318-bf34-d6397fcdbf4e"
},
"commands" : {
"href" : "https://genie.example.com/api/v3/clusters/046a1807-6612-4318-bf34-d6397fcdbf4e/commands{?status}",
"templated" : true
}
}
}
8.3. Find Clusters
8.3.1. Description
Find clusters using various query parameters.
8.3.2. Endpoint
GET /api/v3/clusters
8.3.3. API Docs
Request Documentation
Headers
None
Path Parameters
None
Query Parameters
Parameter | Description |
---|---|
|
The page number to get. Default to 0. |
|
The size of the page to get. Default to 64. |
|
The fields to sort the results by. Defaults to 'updated,desc'. |
|
The name of the clusters to find. Use % to perform a regex like query |
|
The status(es) of the clusters to find. Can have multiple. Options: [UP, OUT_OF_SERVICE, TERMINATED] |
|
The tag(s) of the clusters to find. Can have multiple. |
|
The minimum time (in milliseconds from epoch UTC) that the cluster(s) were updated at. |
|
The maximum time (in milliseconds from epoch UTC) that the cluster(s) were updated at. |
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters?tag=genie.id%3A53ce86cf-a964-4fe1-be55-efbaf1521540' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/clusters?tag=genie.id%3A53ce86cf-a964-4fe1-be55-efbaf1521540'
Response Documentation
Headers
Name | Description |
---|---|
|
application/hal+json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
_links |
Object |
Links to other resources. |
false |
|
page |
Object |
The result page information. |
false |
|
page.size |
Number |
The number of elements in this page result. |
false |
|
page.totalElements |
Number |
The total number of elements this search result could return. |
false |
|
page.totalPages |
Number |
The total number of pages there could be at the current page size. |
false |
|
page.number |
Number |
The current page number. |
false |
|
_embedded.clusterList |
Array |
The found clusters. |
false |
HATEOAS Links
Relation | Description |
---|---|
|
The current search |
|
The first page for this search |
|
The previous page for this search |
|
The next page for this search |
|
The last page for this search |
HTTP Messages
Request
GET /api/v3/clusters?tag=genie.id%3A53ce86cf-a964-4fe1-be55-efbaf1521540 HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:42 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 1298
{
"_embedded" : {
"clusterList" : [ {
"id" : "53ce86cf-a964-4fe1-be55-efbaf1521540",
"created" : "2024-07-11T18:59:40.636Z",
"updated" : "2024-07-11T18:59:40.636Z",
"version" : "0f1c294a-516a-4821-bd49-4783c1e1960b",
"user" : "aac86438-ae6d-4a89-9dc9-36163859b36a",
"name" : "cbc74efd-c544-4ef7-a6b4-6b0081127740",
"description" : null,
"metadata" : null,
"tags" : [ "genie.name:cbc74efd-c544-4ef7-a6b4-6b0081127740", "genie.id:53ce86cf-a964-4fe1-be55-efbaf1521540" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "UP",
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/clusters/53ce86cf-a964-4fe1-be55-efbaf1521540"
},
"commands" : {
"href" : "https://genie.example.com/api/v3/clusters/53ce86cf-a964-4fe1-be55-efbaf1521540/commands{?status}",
"templated" : true
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/clusters?tag=genie.id%3A53ce86cf-a964-4fe1-be55-efbaf1521540{&name,status,minUpdateTime,maxUpdateTime}",
"templated" : true
}
},
"page" : {
"size" : 1,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0
}
}
8.4. Update an Entire Cluster
8.4.1. Description
Update the metadata about a cluster. This method does a complete replace of the resource. Usual flow is to call to get the most recent state then update what you want and call this API with the result.
For more fine grained control call the PATCH API. |
8.4.2. Endpoint
PUT /api/v3/clusters/{id}
8.4.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
configs |
Array |
Any configuration files needed for the resource |
true |
|
status |
String |
The status of the cluster. Options: [UP, OUT_OF_SERVICE, TERMINATED] |
Must not be null |
false |
dependencies |
Array |
The dependencies for the cluster |
true |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b' -i -X PUT \
-H 'Content-Type: application/json' \
-d '{
"id" : "7a83eddb-8163-4118-8113-29e4fa518e6b",
"created" : "2024-07-11T18:59:43.365Z",
"updated" : "2024-07-11T18:59:43.365Z",
"version" : "2.7.1",
"user" : "genie",
"name" : "h2prod",
"description" : null,
"metadata" : null,
"tags" : [ "genie.name:h2prod", "genie.id:7a83eddb-8163-4118-8113-29e4fa518e6b" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "OUT_OF_SERVICE"
}'
HTTPie
$ echo '{
"id" : "7a83eddb-8163-4118-8113-29e4fa518e6b",
"created" : "2024-07-11T18:59:43.365Z",
"updated" : "2024-07-11T18:59:43.365Z",
"version" : "2.7.1",
"user" : "genie",
"name" : "h2prod",
"description" : null,
"metadata" : null,
"tags" : [ "genie.name:h2prod", "genie.id:7a83eddb-8163-4118-8113-29e4fa518e6b" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "OUT_OF_SERVICE"
}' | http PUT 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b' \
'Content-Type:application/json'
HTTP Messages
Request
PUT /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 425
{
"id" : "7a83eddb-8163-4118-8113-29e4fa518e6b",
"created" : "2024-07-11T18:59:43.365Z",
"updated" : "2024-07-11T18:59:43.365Z",
"version" : "2.7.1",
"user" : "genie",
"name" : "h2prod",
"description" : null,
"metadata" : null,
"tags" : [ "genie.name:h2prod", "genie.id:7a83eddb-8163-4118-8113-29e4fa518e6b" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "OUT_OF_SERVICE"
}
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:42 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.5. Update Parts of a Cluster
8.5.1. Description
Update the metadata about a cluster using JSON Patch. This will ONLY update the fields you request be changed.
For more information about JSON Patch RFC see the website. |
8.5.2. Endpoint
PATCH /api/v3/clusters/{id}
8.5.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of patches to apply |
false |
|
[].op |
String |
Patch operation to perform. |
add, remove, replace, copy, move, test |
false |
[].path |
String |
The json path to operate on. e.g. /user |
false |
|
[].from |
String |
The json path to move or copy from. e.g. /user |
true |
|
[].value |
String |
The json value to put at the path for an add, replace or test |
true |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b' -i -X PATCH \
-H 'Content-Type: application/json' \
-d '[ {
"op" : "replace",
"path" : "/name",
"value" : "99643549-d169-45bd-82d8-9fc2ff4d9db0"
} ]'
HTTPie
$ echo '[ {
"op" : "replace",
"path" : "/name",
"value" : "99643549-d169-45bd-82d8-9fc2ff4d9db0"
} ]' | http PATCH 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b' \
'Content-Type:application/json'
HTTP Messages
Request
PATCH /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 98
[ {
"op" : "replace",
"path" : "/name",
"value" : "99643549-d169-45bd-82d8-9fc2ff4d9db0"
} ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:43 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.6. Delete All Clusters
8.6.1. Description
Delete all the clusters currently stored in the system.
You won’t be able to delete any cluster that has run any job that is still in the system to maintain the ability for users to look up information about their job (where it ran, etc) |
8.6.2. Endpoint
DELETE /api/v3/clusters
8.6.3. API Docs
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/clusters'
HTTP Messages
Request
DELETE /api/v3/clusters HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:42 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.7. Delete a Cluster
8.7.1. Description
Delete a cluster currently configured in the system.
You won’t be able to delete a cluster that has run any job that is still in the system to maintain the ability for users to look up information about their job (where it ran, etc) |
8.7.2. Endpoint
DELETE /api/v3/clusters/{id}
8.7.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/ce488807-8422-4d5c-a11d-0de039682250' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/clusters/ce488807-8422-4d5c-a11d-0de039682250'
HTTP Messages
Request
DELETE /api/v3/clusters/ce488807-8422-4d5c-a11d-0de039682250 HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:36 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.8. Get Configs for Cluster
8.8.1. Description
Get the configuration file locations for a cluster.
8.8.2. Endpoint
GET /api/v3/clusters/{id}/configs
8.8.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/configs' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/configs'
Response Documentation
Headers
Name | Description |
---|---|
|
application/json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of configuration file locations |
false |
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/configs HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:38 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 82
[ "0164157f-676e-4786-8050-ff811733c4ad", "fe3f1597-3851-413f-9dc8-cdfc9b1050af" ]
8.9. Add Configs to Cluster
8.9.1. Description
Add configuration file locations to an existing cluster.
Configurations are stored as a set so any duplicates will be ignored. |
8.9.2. Endpoint
POST /api/v3/clusters/{id}/configs
8.9.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of configuration file locations |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/configs' -i -X POST \
-H 'Content-Type: application/json' \
-d '[ "0164157f-676e-4786-8050-ff811733c4ad", "fe3f1597-3851-413f-9dc8-cdfc9b1050af" ]'
HTTPie
$ echo '[ "0164157f-676e-4786-8050-ff811733c4ad", "fe3f1597-3851-413f-9dc8-cdfc9b1050af" ]' | http POST 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/configs' \
'Content-Type:application/json'
HTTP Messages
Request
POST /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/configs HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 82
[ "0164157f-676e-4786-8050-ff811733c4ad", "fe3f1597-3851-413f-9dc8-cdfc9b1050af" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:38 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.10. Update Configs for a Cluster
8.10.1. Description
Update the configuration file locations for an existing cluster. Stored as a set so duplicates are ignored.
8.10.2. Endpoint
PUT /api/v3/clusters/{id}/configs
8.10.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of configuration file locations |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/configs' -i -X PUT \
-H 'Content-Type: application/json' \
-d '[ "57d10b19-16f3-41f6-b1be-059c037cc70d" ]'
HTTPie
$ echo '[ "57d10b19-16f3-41f6-b1be-059c037cc70d" ]' | http PUT 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/configs' \
'Content-Type:application/json'
HTTP Messages
Request
PUT /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/configs HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 42
[ "57d10b19-16f3-41f6-b1be-059c037cc70d" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:42 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.11. Remove All Configs From a Cluster
8.11.1. Description
Remove all the configuration file locations for an existing cluster.
8.11.2. Endpoint
DELETE /api/v3/clusters/{id}/configs
8.11.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/configs' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/configs'
HTTP Messages
Request
DELETE /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/configs HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:37 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.12. Get Dependencies For an Cluster
8.12.1. Description
Get the dependency file locations for a cluster.
8.12.2. Endpoint
GET /api/v3/clusters/{id}/dependencies
8.12.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/dependencies' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/dependencies'
Response Documentation
Headers
Name | Description |
---|---|
|
application/json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of dependency file locations |
false |
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/dependencies HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:38 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 82
[ "331487f7-5903-4221-ae4e-907d3076dd6d", "5868bd59-9603-427a-b90c-98003a8364b0" ]
8.13. Add Dependencies to Cluster
8.13.1. Description
Add dependency file locations to an existing cluster. Stored as a set so all duplicates are ignored.
8.13.2. Endpoint
POST /api/v3/clusters/{id}/dependencies
8.13.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of dependency file locations |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/dependencies' -i -X POST \
-H 'Content-Type: application/json' \
-d '[ "5868bd59-9603-427a-b90c-98003a8364b0", "331487f7-5903-4221-ae4e-907d3076dd6d" ]'
HTTPie
$ echo '[ "5868bd59-9603-427a-b90c-98003a8364b0", "331487f7-5903-4221-ae4e-907d3076dd6d" ]' | http POST 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/dependencies' \
'Content-Type:application/json'
HTTP Messages
Request
POST /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/dependencies HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 82
[ "5868bd59-9603-427a-b90c-98003a8364b0", "331487f7-5903-4221-ae4e-907d3076dd6d" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:38 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.14. Update Dependencies for an Cluster
8.14.1. Description
Update the dependency file locations for an existing cluster
8.14.2. Endpoint
PUT /api/v3/clusters/{id}/dependencies
8.14.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of dependency file locations |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/configs' -i -X PUT \
-H 'Content-Type: application/json' \
-d '[ "cf44273f-42cb-4870-8a5b-1cc327b6d354" ]'
HTTPie
$ echo '[ "cf44273f-42cb-4870-8a5b-1cc327b6d354" ]' | http PUT 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/configs' \
'Content-Type:application/json'
HTTP Messages
Request
PUT /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/configs HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 42
[ "cf44273f-42cb-4870-8a5b-1cc327b6d354" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:42 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.15. Remove All Dependencies From an Cluster
8.15.1. Description
Remove all the dependency file locations for an existing cluster.
8.15.2. Endpoint
DELETE /api/v3/clusters/{id}/dependencies
8.15.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/dependencies' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/dependencies'
HTTP Messages
Request
DELETE /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/dependencies HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:38 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.16. Get Tags For a Cluster
8.16.1. Description
Get the tags for a cluster.
8.16.2. Endpoint
GET /api/v3/clusters/{id}/tags
8.16.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/tags' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/tags'
Response Documentation
Headers
Name | Description |
---|---|
|
application/json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of tags |
false |
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/tags HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:43 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 152
[ "6fb61a98-772c-4030-bb1c-2b0d5b0c5826", "genie.name:h2prod", "c481d60f-a15e-4576-bc8e-cf72ef0a4059", "genie.id:7a83eddb-8163-4118-8113-29e4fa518e6b" ]
8.17. Add Tags to Cluster
8.17.1. Description
Add tags to an existing cluster. Stored as a set so all duplicates are ignored.
genie.id:{id} and genie.name:{name} tags are automatically added by the service.
|
8.17.2. Endpoint
POST /api/v3/clusters/{id}/tags
8.17.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of tags |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/tags' -i -X POST \
-H 'Content-Type: application/json' \
-d '[ "c481d60f-a15e-4576-bc8e-cf72ef0a4059", "6fb61a98-772c-4030-bb1c-2b0d5b0c5826" ]'
HTTPie
$ echo '[ "c481d60f-a15e-4576-bc8e-cf72ef0a4059", "6fb61a98-772c-4030-bb1c-2b0d5b0c5826" ]' | http POST 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/tags' \
'Content-Type:application/json'
HTTP Messages
Request
POST /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/tags HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 82
[ "c481d60f-a15e-4576-bc8e-cf72ef0a4059", "6fb61a98-772c-4030-bb1c-2b0d5b0c5826" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:43 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.18. Update Tags for a Cluster
8.18.1. Description
Update the tags for an existing cluster.
The genie.id:{id} and genie.name:{name} tags can’t be removed. They will automatically be added back
by the system.
|
8.18.2. Endpoint
PUT /api/v3/clusters/{id}/tags
8.18.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of tags |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/tags' -i -X PUT \
-H 'Content-Type: application/json' \
-d '[ "5e2481ca-ca10-4e8a-a4be-dc49594059b4" ]'
HTTPie
$ echo '[ "5e2481ca-ca10-4e8a-a4be-dc49594059b4" ]' | http PUT 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/tags' \
'Content-Type:application/json'
HTTP Messages
Request
PUT /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/tags HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 42
[ "5e2481ca-ca10-4e8a-a4be-dc49594059b4" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:42 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.19. Remove All Tags From Cluster
8.19.1. Description
Remove all the tags for an existing cluster
The genie.id:{id} and genie.name:{name} tags will NOT be removed by this operation
|
8.19.2. Endpoint
DELETE /api/v3/clusters/{id}/tags
8.19.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/tags' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/tags'
HTTP Messages
Request
DELETE /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/tags HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:37 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.20. Remove Tag From Cluster
8.20.1. Description
Remove a tag from an existing cluster.
You can’t remove the genie.id:{id} and genie.name:{name} tags. They will just be added back by the system
|
8.20.2. Endpoint
DELETE /api/v3/clusters/{id}/tags/{tag}
8.20.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
|
The tag to remove |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/tags/e0db72b7-0590-4985-a8c4-1f1fe2799f9d' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/tags/e0db72b7-0590-4985-a8c4-1f1fe2799f9d'
HTTP Messages
Request
DELETE /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/tags/e0db72b7-0590-4985-a8c4-1f1fe2799f9d HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:42 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.21. Add Commands to a Cluster
Deprecated |
As of Genie 4.0.0 commands are no longer hard linked to clusters, instead they are dynamically linked by
resolving a command’s cluster criteria against the current set of UP clusters. This API is now a no-op.
|
8.21.1. Endpoint
POST /api/v3/clusters/{id}/commands
8.21.2. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of command ids (in preferred order) to append to the existing list of commands |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/commands' -i -X POST \
-H 'Content-Type: application/json' \
-d '[ "57385ad0-bdb4-40ad-8191-167992157f1e", "61c22070-ae5c-43c9-94de-fb4e20c3af82" ]'
HTTPie
$ echo '[ "57385ad0-bdb4-40ad-8191-167992157f1e", "61c22070-ae5c-43c9-94de-fb4e20c3af82" ]' | http POST 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/commands' \
'Content-Type:application/json'
HTTP Messages
Request
POST /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/commands HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 82
[ "57385ad0-bdb4-40ad-8191-167992157f1e", "61c22070-ae5c-43c9-94de-fb4e20c3af82" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:38 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.22. Get the Commands for a Cluster
Deprecated |
As of Genie 4.0.0 commands are no longer hard linked to clusters, instead they are dynamically linked by
resolving a command’s cluster criteria against the current set of UP clusters. This API is now a no-op.
|
8.22.1. Endpoint
GET /api/v3/clusters/{id}/commands
8.22.2. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
Parameter | Description |
---|---|
|
The status of commands to search for |
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/commands?status=ACTIVE' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/commands?status=ACTIVE'
HTTP Messages
Request
GET /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/commands?status=ACTIVE HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:38 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 3
[ ]
8.23. Set Commands for a Cluster
Deprecated |
As of Genie 4.0.0 commands are no longer hard linked to clusters, instead they are dynamically linked by
resolving a command’s cluster criteria against the current set of UP clusters. This API is now a no-op.
|
8.23.1. Endpoint
PUT /api/v3/clusters/{id}/commands
8.23.2. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of command ids (in preferred order) to replace the existing list of commands |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/commands' -i -X PUT \
-H 'Content-Type: application/json' \
-d '[ "e30cb3d9-dd38-48e0-b27c-2585c244a742", "0264a08b-d919-486c-a824-34fb3739e12c" ]'
HTTPie
$ echo '[ "e30cb3d9-dd38-48e0-b27c-2585c244a742", "0264a08b-d919-486c-a824-34fb3739e12c" ]' | http PUT 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/commands' \
'Content-Type:application/json'
HTTP Messages
Request
PUT /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/commands HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 82
[ "e30cb3d9-dd38-48e0-b27c-2585c244a742", "0264a08b-d919-486c-a824-34fb3739e12c" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:37 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.24. Remove All Commands From a Cluster
Deprecated |
As of Genie 4.0.0 commands are no longer hard linked to clusters, instead they are dynamically linked by
resolving a command’s cluster criteria against the current set of UP clusters. This API is now a no-op.
|
8.24.1. Endpoint
DELETE /api/v3/clusters/{id}/commands
8.24.2. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/commands' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/commands'
HTTP Messages
Request
DELETE /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/commands HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:37 GMT
Keep-Alive: timeout=60
Connection: keep-alive
8.25. Remove A Single Command From a Cluster
Deprecated |
As of Genie 4.0.0 commands are no longer hard linked to clusters, instead they are dynamically linked by
resolving a command’s cluster criteria against the current set of UP clusters. This API is now a no-op.
|
8.25.1. Endpoint
DELETE /api/v3/clusters/{id}/commands/{commandId}
8.25.2. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
|
The id of the command to remove |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/commands/89bbbbee-6b35-44f1-a2b2-6ffadfd7e91c' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/commands/89bbbbee-6b35-44f1-a2b2-6ffadfd7e91c'
HTTP Messages
Request
DELETE /api/v3/clusters/7a83eddb-8163-4118-8113-29e4fa518e6b/commands/89bbbbee-6b35-44f1-a2b2-6ffadfd7e91c HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:37 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9. Commands API
9.1. Create a Command
9.1.1. Description
Create a new command in the system.
9.1.2. Endpoint
POST /api/v3/commands
The id in this example is optional. If you include one Genie will use it. If not it will provide one. If you provide one it must be unique. |
9.1.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
None
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
configs |
Array |
Any configuration files needed for the resource |
true |
|
status |
String |
The status of the command. Options: [ACTIVE, DEPRECATED, INACTIVE] |
Must not be null |
false |
executable |
String |
The executable to run on the Genie node when this command is used. e.g. /usr/bin/hadoop |
Must not be empty. Size must be between 0 and 1024 inclusive |
false |
executableAndArguments |
Array |
The executable and arguments to run on the Genie node when this command is used. e.g. /usr/bin/hadoop |
Must not be empty |
false |
checkDelay |
Number |
Deprecated as of 4.3.0. Now is a no-op on the server side. |
false |
|
memory |
Number |
The default amount of memory (in MB) that should be allocated for instances of this command client |
Must be at least 1 |
true |
dependencies |
Array |
The dependencies for the command |
true |
|
clusterCriteria |
Array |
The priority ordered list of criteria to resolve clusters that this command can run jobs on |
true |
|
runtime |
Object |
The various job runtime parameters that should be used if this command is used |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands' -i -X POST \
-H 'Content-Type: application/json' \
-d '{
"id" : null,
"created" : null,
"updated" : null,
"version" : "1.0.0",
"user" : "genie",
"name" : "hive",
"description" : "Hive command v1.0.0",
"metadata" : null,
"tags" : [ "tag:bar", "tag:foo" ],
"configs" : [ "s3:///path/to/config-foo", "s3:///path/to/config-bar" ],
"dependencies" : [ "/path/to/file/foo", "/path/to/file/bar" ],
"setupFile" : null,
"status" : "ACTIVE",
"executable" : "/apps/hive/bin/hive",
"executableAndArguments" : [ "/apps/hive/bin/hive" ],
"checkDelay" : 10000,
"memory" : 1024,
"clusterCriteria" : [ {
"id" : "f1baa442-ff99-4efb-8ac3-9aded31eb32a",
"name" : null,
"version" : null,
"status" : null,
"tags" : [ "8be8d47c-ad83-4699-8ac9-e32f8113adf2", "9e44dddc-2a9e-44d3-83b1-41021e79fb14" ]
}, {
"id" : "2bfdf650-2eb1-49b6-a2ab-83a21c176701",
"name" : "prod",
"version" : "1.0.0",
"status" : "UP",
"tags" : [ "67ccaff6-ad32-4cf3-a677-7c6464b8778f", "2b98196a-6c16-42b4-b693-5409b0a87a28", "11f05a2e-4ef9-4f53-bd48-a8a0e44572d0" ]
} ],
"runtime" : {
"resources" : {
"cpu" : null,
"gpu" : null,
"memoryMb" : 1024,
"diskMb" : null,
"networkMbps" : null
},
"images" : { }
}
}'
HTTPie
$ echo '{
"id" : null,
"created" : null,
"updated" : null,
"version" : "1.0.0",
"user" : "genie",
"name" : "hive",
"description" : "Hive command v1.0.0",
"metadata" : null,
"tags" : [ "tag:bar", "tag:foo" ],
"configs" : [ "s3:///path/to/config-foo", "s3:///path/to/config-bar" ],
"dependencies" : [ "/path/to/file/foo", "/path/to/file/bar" ],
"setupFile" : null,
"status" : "ACTIVE",
"executable" : "/apps/hive/bin/hive",
"executableAndArguments" : [ "/apps/hive/bin/hive" ],
"checkDelay" : 10000,
"memory" : 1024,
"clusterCriteria" : [ {
"id" : "f1baa442-ff99-4efb-8ac3-9aded31eb32a",
"name" : null,
"version" : null,
"status" : null,
"tags" : [ "8be8d47c-ad83-4699-8ac9-e32f8113adf2", "9e44dddc-2a9e-44d3-83b1-41021e79fb14" ]
}, {
"id" : "2bfdf650-2eb1-49b6-a2ab-83a21c176701",
"name" : "prod",
"version" : "1.0.0",
"status" : "UP",
"tags" : [ "67ccaff6-ad32-4cf3-a677-7c6464b8778f", "2b98196a-6c16-42b4-b693-5409b0a87a28", "11f05a2e-4ef9-4f53-bd48-a8a0e44572d0" ]
} ],
"runtime" : {
"resources" : {
"cpu" : null,
"gpu" : null,
"memoryMb" : 1024,
"diskMb" : null,
"networkMbps" : null
},
"images" : { }
}
}' | http POST 'https://genie.example.com/api/v3/commands' \
'Content-Type:application/json'
Response Documentation
Headers
Name | Description |
---|---|
|
The URI |
Payload Fields
None
HATEOAS Links
None
HTTP Messages
Request
POST /api/v3/commands HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 1226
{
"id" : null,
"created" : null,
"updated" : null,
"version" : "1.0.0",
"user" : "genie",
"name" : "hive",
"description" : "Hive command v1.0.0",
"metadata" : null,
"tags" : [ "tag:bar", "tag:foo" ],
"configs" : [ "s3:///path/to/config-foo", "s3:///path/to/config-bar" ],
"dependencies" : [ "/path/to/file/foo", "/path/to/file/bar" ],
"setupFile" : null,
"status" : "ACTIVE",
"executable" : "/apps/hive/bin/hive",
"executableAndArguments" : [ "/apps/hive/bin/hive" ],
"checkDelay" : 10000,
"memory" : 1024,
"clusterCriteria" : [ {
"id" : "f1baa442-ff99-4efb-8ac3-9aded31eb32a",
"name" : null,
"version" : null,
"status" : null,
"tags" : [ "8be8d47c-ad83-4699-8ac9-e32f8113adf2", "9e44dddc-2a9e-44d3-83b1-41021e79fb14" ]
}, {
"id" : "2bfdf650-2eb1-49b6-a2ab-83a21c176701",
"name" : "prod",
"version" : "1.0.0",
"status" : "UP",
"tags" : [ "67ccaff6-ad32-4cf3-a677-7c6464b8778f", "2b98196a-6c16-42b4-b693-5409b0a87a28", "11f05a2e-4ef9-4f53-bd48-a8a0e44572d0" ]
} ],
"runtime" : {
"resources" : {
"cpu" : null,
"gpu" : null,
"memoryMb" : 1024,
"diskMb" : null,
"networkMbps" : null
},
"images" : { }
}
}
Response
HTTP/1.1 201 Created
Location: https://genie.example.com/api/v3/commands/ed74b2a9-8556-4e25-900e-59fe04ef9ad2
Date: Thu, 11 Jul 2024 18:59:48 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.2. Get a Command
9.2.1. Description
Get the metadata about a command in the system.
9.2.2. Endpoint
GET /api/v3/commands/{id}
9.2.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/ed74b2a9-8556-4e25-900e-59fe04ef9ad2' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/commands/ed74b2a9-8556-4e25-900e-59fe04ef9ad2'
Response Documentation
Headers
Name | Description |
---|---|
|
application/hal+json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
configs |
Array |
Any configuration files needed for the resource |
true |
|
status |
String |
The status of the command. Options: [ACTIVE, DEPRECATED, INACTIVE] |
Must not be null |
false |
executable |
String |
The executable to run on the Genie node when this command is used. e.g. /usr/bin/hadoop |
Must not be empty. Size must be between 0 and 1024 inclusive |
false |
executableAndArguments |
Array |
The executable and arguments to run on the Genie node when this command is used. e.g. /usr/bin/hadoop |
Must not be empty |
false |
checkDelay |
Number |
Deprecated as of 4.3.0. Now is a no-op on the server side. |
false |
|
memory |
Number |
The default amount of memory (in MB) that should be allocated for instances of this command client |
Must be at least 1 |
true |
dependencies |
Array |
The dependencies for the command |
true |
|
clusterCriteria |
Array |
The priority ordered list of criteria to resolve clusters that this command can run jobs on |
true |
|
runtime |
Object |
The various job runtime parameters that should be used if this command is used |
false |
HATEOAS Links
Relation | Description |
---|---|
|
URI for this command |
|
Get all the applications this command depends on |
|
Get all clusters this command is available on |
HTTP Messages
Request
GET /api/v3/commands/ed74b2a9-8556-4e25-900e-59fe04ef9ad2 HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:48 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 1814
{
"id" : "ed74b2a9-8556-4e25-900e-59fe04ef9ad2",
"created" : "2024-07-11T18:59:48.405Z",
"updated" : "2024-07-11T18:59:48.405Z",
"version" : "1.0.0",
"user" : "genie",
"name" : "hive",
"description" : "Hive command v1.0.0",
"metadata" : null,
"tags" : [ "genie.id:ed74b2a9-8556-4e25-900e-59fe04ef9ad2", "tag:bar", "tag:foo", "genie.name:hive" ],
"configs" : [ "s3:///path/to/config-foo", "s3:///path/to/config-bar" ],
"dependencies" : [ "/path/to/file/foo", "/path/to/file/bar" ],
"setupFile" : null,
"status" : "ACTIVE",
"executable" : "/apps/hive/bin/hive",
"executableAndArguments" : [ "/apps/hive/bin/hive" ],
"checkDelay" : 10000,
"memory" : 1024,
"clusterCriteria" : [ {
"id" : "f1baa442-ff99-4efb-8ac3-9aded31eb32a",
"name" : null,
"version" : null,
"status" : null,
"tags" : [ "8be8d47c-ad83-4699-8ac9-e32f8113adf2", "9e44dddc-2a9e-44d3-83b1-41021e79fb14" ]
}, {
"id" : "2bfdf650-2eb1-49b6-a2ab-83a21c176701",
"name" : "prod",
"version" : "1.0.0",
"status" : "UP",
"tags" : [ "67ccaff6-ad32-4cf3-a677-7c6464b8778f", "2b98196a-6c16-42b4-b693-5409b0a87a28", "11f05a2e-4ef9-4f53-bd48-a8a0e44572d0" ]
} ],
"runtime" : {
"resources" : {
"cpu" : null,
"gpu" : null,
"memoryMb" : 1024,
"diskMb" : null,
"networkMbps" : null
},
"images" : { }
},
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/commands/ed74b2a9-8556-4e25-900e-59fe04ef9ad2"
},
"applications" : {
"href" : "https://genie.example.com/api/v3/commands/ed74b2a9-8556-4e25-900e-59fe04ef9ad2/applications"
},
"clusters" : {
"href" : "https://genie.example.com/api/v3/commands/ed74b2a9-8556-4e25-900e-59fe04ef9ad2/clusters{?status}",
"templated" : true
}
}
}
9.3. Find Commands
9.3.1. Description
Find commands using various query parameters.
9.3.2. Endpoint
GET /api/v3/commands
9.3.3. API Docs
Request Documentation
Headers
None
Path Parameters
None
Query Parameters
Parameter | Description |
---|---|
|
The page number to get. Default to 0. |
|
The size of the page to get. Default to 64. |
|
The fields to sort the results by. Defaults to 'updated,desc'. |
|
The name of the commands to find. Use % to perform a regex like query |
|
The user of the commands to find. Use % to perform a regex like query |
|
The status(es) of the commands to find. Can have multiple. Options: [ACTIVE, DEPRECATED, INACTIVE] |
|
The tag(s) of the commands to find. Can have multiple. |
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands?status=ACTIVE&status=INACTIVE&status=%5BACTIVE%2C+INACTIVE%5D' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/commands?status=ACTIVE&status=INACTIVE&status=%5BACTIVE%2C+INACTIVE%5D'
Response Documentation
Headers
Name | Description |
---|---|
|
application/hal+json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
_links |
Object |
Links to other resources. |
false |
|
page |
Object |
The result page information. |
false |
|
page.size |
Number |
The number of elements in this page result. |
false |
|
page.totalElements |
Number |
The total number of elements this search result could return. |
false |
|
page.totalPages |
Number |
The total number of pages there could be at the current page size. |
false |
|
page.number |
Number |
The current page number. |
false |
|
_embedded.commandList |
Array |
The found commands. |
false |
HATEOAS Links
Relation | Description |
---|---|
|
The current search |
|
The first page for this search |
|
The previous page for this search |
|
The next page for this search |
|
The last page for this search |
HTTP Messages
Request
GET /api/v3/commands?status=ACTIVE&status=INACTIVE&status=%5BACTIVE%2C+INACTIVE%5D HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:46 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 3311
{
"_embedded" : {
"commandList" : [ {
"id" : "964f5815-1d94-4192-8a0d-160a9b65a0e6",
"created" : "2024-07-11T18:59:46.363Z",
"updated" : "2024-07-11T18:59:46.363Z",
"version" : "62871ca9-5c36-4ee5-9ed9-b60a82a10a53",
"user" : "044470d7-43ba-4ef0-9867-8e0c8cd1802b",
"name" : "e7771217-f164-4828-aea1-e2ae94ba86b2",
"description" : null,
"metadata" : null,
"tags" : [ "genie.name:e7771217-f164-4828-aea1-e2ae94ba86b2", "genie.id:964f5815-1d94-4192-8a0d-160a9b65a0e6" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "INACTIVE",
"executable" : "/apps/hive/bin/hive",
"executableAndArguments" : [ "/apps/hive/bin/hive" ],
"checkDelay" : 10000,
"memory" : null,
"clusterCriteria" : [ ],
"runtime" : {
"resources" : {
"cpu" : null,
"gpu" : null,
"memoryMb" : null,
"diskMb" : null,
"networkMbps" : null
},
"images" : { }
},
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/commands/964f5815-1d94-4192-8a0d-160a9b65a0e6"
},
"applications" : {
"href" : "https://genie.example.com/api/v3/commands/964f5815-1d94-4192-8a0d-160a9b65a0e6/applications"
},
"clusters" : {
"href" : "https://genie.example.com/api/v3/commands/964f5815-1d94-4192-8a0d-160a9b65a0e6/clusters{?status}",
"templated" : true
}
}
}, {
"id" : "e37577f8-a57e-492c-989c-46252c77c424",
"created" : "2024-07-11T18:59:44.337Z",
"updated" : "2024-07-11T18:59:44.337Z",
"version" : "097d26d8-aa68-4d02-bede-729beb50c205",
"user" : "f01840e8-74b7-4504-832b-869722f75fc4",
"name" : "3d33ed25-dab5-45c5-95d4-9d4a5ac07520",
"description" : null,
"metadata" : null,
"tags" : [ "genie.id:e37577f8-a57e-492c-989c-46252c77c424", "genie.name:3d33ed25-dab5-45c5-95d4-9d4a5ac07520" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "ACTIVE",
"executable" : "/apps/hive/bin/hive",
"executableAndArguments" : [ "/apps/hive/bin/hive" ],
"checkDelay" : 10000,
"memory" : null,
"clusterCriteria" : [ ],
"runtime" : {
"resources" : {
"cpu" : null,
"gpu" : null,
"memoryMb" : null,
"diskMb" : null,
"networkMbps" : null
},
"images" : { }
},
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/commands/e37577f8-a57e-492c-989c-46252c77c424"
},
"applications" : {
"href" : "https://genie.example.com/api/v3/commands/e37577f8-a57e-492c-989c-46252c77c424/applications"
},
"clusters" : {
"href" : "https://genie.example.com/api/v3/commands/e37577f8-a57e-492c-989c-46252c77c424/clusters{?status}",
"templated" : true
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://genie.example.com/api/v3/commands?status=ACTIVE&status=INACTIVE{&name,user,tag}",
"templated" : true
}
},
"page" : {
"size" : 64,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
9.4. Update an Entire Command
9.4.1. Description
Update the metadata about a command. This method does a complete replace of the resource. Usual flow is to call to get the most recent state then update what you want and call this API with the result.
For more fine grained control call the PATCH API. |
9.4.2. Endpoint
PUT /api/v3/commands/{id}
9.4.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
tags |
Array |
The tags |
true |
|
setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
configs |
Array |
Any configuration files needed for the resource |
true |
|
status |
String |
The status of the command. Options: [ACTIVE, DEPRECATED, INACTIVE] |
Must not be null |
false |
executable |
String |
The executable to run on the Genie node when this command is used. e.g. /usr/bin/hadoop |
Must not be empty. Size must be between 0 and 1024 inclusive |
false |
executableAndArguments |
Array |
The executable and arguments to run on the Genie node when this command is used. e.g. /usr/bin/hadoop |
Must not be empty |
false |
checkDelay |
Number |
Deprecated as of 4.3.0. Now is a no-op on the server side. |
false |
|
memory |
Number |
The default amount of memory (in MB) that should be allocated for instances of this command client |
Must be at least 1 |
true |
dependencies |
Array |
The dependencies for the command |
true |
|
clusterCriteria |
Array |
The priority ordered list of criteria to resolve clusters that this command can run jobs on |
true |
|
runtime |
Object |
The various job runtime parameters that should be used if this command is used |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99' -i -X PUT \
-H 'Content-Type: application/json' \
-d '{
"id" : "4bb702f0-b2b4-4615-b158-1998bc80dc99",
"created" : "2024-07-11T18:59:49.490Z",
"updated" : "2024-07-11T18:59:49.490Z",
"version" : "1.0.0",
"user" : "genie",
"name" : "hive",
"description" : null,
"metadata" : null,
"tags" : [ "genie.name:hive", "genie.id:4bb702f0-b2b4-4615-b158-1998bc80dc99" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "INACTIVE",
"executable" : "/apps/hive/bin/hive",
"executableAndArguments" : [ "/apps/hive/bin/hive" ],
"checkDelay" : 10000,
"memory" : null,
"clusterCriteria" : [ ],
"runtime" : {
"resources" : {
"cpu" : null,
"gpu" : null,
"memoryMb" : null,
"diskMb" : null,
"networkMbps" : null
},
"images" : { }
}
}'
HTTPie
$ echo '{
"id" : "4bb702f0-b2b4-4615-b158-1998bc80dc99",
"created" : "2024-07-11T18:59:49.490Z",
"updated" : "2024-07-11T18:59:49.490Z",
"version" : "1.0.0",
"user" : "genie",
"name" : "hive",
"description" : null,
"metadata" : null,
"tags" : [ "genie.name:hive", "genie.id:4bb702f0-b2b4-4615-b158-1998bc80dc99" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "INACTIVE",
"executable" : "/apps/hive/bin/hive",
"executableAndArguments" : [ "/apps/hive/bin/hive" ],
"checkDelay" : 10000,
"memory" : null,
"clusterCriteria" : [ ],
"runtime" : {
"resources" : {
"cpu" : null,
"gpu" : null,
"memoryMb" : null,
"diskMb" : null,
"networkMbps" : null
},
"images" : { }
}
}' | http PUT 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99' \
'Content-Type:application/json'
HTTP Messages
Request
PUT /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99 HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 763
{
"id" : "4bb702f0-b2b4-4615-b158-1998bc80dc99",
"created" : "2024-07-11T18:59:49.490Z",
"updated" : "2024-07-11T18:59:49.490Z",
"version" : "1.0.0",
"user" : "genie",
"name" : "hive",
"description" : null,
"metadata" : null,
"tags" : [ "genie.name:hive", "genie.id:4bb702f0-b2b4-4615-b158-1998bc80dc99" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "INACTIVE",
"executable" : "/apps/hive/bin/hive",
"executableAndArguments" : [ "/apps/hive/bin/hive" ],
"checkDelay" : 10000,
"memory" : null,
"clusterCriteria" : [ ],
"runtime" : {
"resources" : {
"cpu" : null,
"gpu" : null,
"memoryMb" : null,
"diskMb" : null,
"networkMbps" : null
},
"images" : { }
}
}
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:49 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.5. Update Parts of a Command
9.5.1. Description
Update the metadata about a command using JSON Patch. This will ONLY update the fields you request be changed.
For more information about JSON Patch RFC see the website. |
9.5.2. Endpoint
PATCH /api/v3/commands/{id}
9.5.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of patches to apply |
false |
|
[].op |
String |
Patch operation to perform. |
add, remove, replace, copy, move, test |
false |
[].path |
String |
The json path to operate on. e.g. /user |
false |
|
[].from |
String |
The json path to move or copy from. e.g. /user |
true |
|
[].value |
String |
The json value to put at the path for an add, replace or test |
true |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99' -i -X PATCH \
-H 'Content-Type: application/json' \
-d '[ {
"op" : "replace",
"path" : "/name",
"value" : "9641959d-19ed-4616-978c-7ad8ba4a75f8"
} ]'
HTTPie
$ echo '[ {
"op" : "replace",
"path" : "/name",
"value" : "9641959d-19ed-4616-978c-7ad8ba4a75f8"
} ]' | http PATCH 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99' \
'Content-Type:application/json'
HTTP Messages
Request
PATCH /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99 HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 98
[ {
"op" : "replace",
"path" : "/name",
"value" : "9641959d-19ed-4616-978c-7ad8ba4a75f8"
} ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:49 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.6. Delete All Commands
9.6.1. Description
Delete all the commands currently stored in the system.
You won’t be able to delete any command that has been used by any job that is still in the system to maintain the ability for users to look up information about their job (where it ran, what it ran, etc) |
9.6.2. Endpoint
DELETE /api/v3/commands
9.6.3. API Docs
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/commands'
HTTP Messages
Request
DELETE /api/v3/commands HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:46 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.7. Delete a Command
9.7.1. Description
Delete a command currently configured in the system.
You won’t be able to delete a command that has been used by any job that is still in the system to maintain the ability for users to look up information about their job (where it ran, what it ran, etc) |
9.7.2. Endpoint
DELETE /api/v3/commands/{id}
9.7.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/628a144b-a4e0-4c4b-89d9-0721c80f5041' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/commands/628a144b-a4e0-4c4b-89d9-0721c80f5041'
HTTP Messages
Request
DELETE /api/v3/commands/628a144b-a4e0-4c4b-89d9-0721c80f5041 HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:43 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.8. Get Configs for Command
9.8.1. Description
Get the configuration file locations for a command.
9.8.2. Endpoint
GET /api/v3/commands/{id}/configs
9.8.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/configs' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/configs'
Response Documentation
Headers
Name | Description |
---|---|
|
application/json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of configuration file locations |
false |
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/configs HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:47 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 82
[ "c649c1d1-5be4-4379-ba11-75c38ca45fdc", "6cc2b719-fd7b-417d-bb9f-01ec574f5265" ]
9.9. Add Configs to Command
9.9.1. Description
Add configuration file locations to an existing command.
Configurations are stored as a set so any duplicates will be ignored. |
9.9.2. Endpoint
POST /api/v3/commands/{id}/configs
9.9.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of configuration file locations |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/configs' -i -X POST \
-H 'Content-Type: application/json' \
-d '[ "c649c1d1-5be4-4379-ba11-75c38ca45fdc", "6cc2b719-fd7b-417d-bb9f-01ec574f5265" ]'
HTTPie
$ echo '[ "c649c1d1-5be4-4379-ba11-75c38ca45fdc", "6cc2b719-fd7b-417d-bb9f-01ec574f5265" ]' | http POST 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/configs' \
'Content-Type:application/json'
HTTP Messages
Request
POST /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/configs HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 82
[ "c649c1d1-5be4-4379-ba11-75c38ca45fdc", "6cc2b719-fd7b-417d-bb9f-01ec574f5265" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:47 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.10. Update Configs for a Command
9.10.1. Description
Update the configuration file locations for an existing command. Stored as a set so duplicates are ignored.
9.10.2. Endpoint
PUT /api/v3/commands/{id}/configs
9.10.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of configuration file locations |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/configs' -i -X PUT \
-H 'Content-Type: application/json' \
-d '[ "b4829ff7-de84-4a81-8e2e-c866a3ef0d25" ]'
HTTPie
$ echo '[ "b4829ff7-de84-4a81-8e2e-c866a3ef0d25" ]' | http PUT 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/configs' \
'Content-Type:application/json'
HTTP Messages
Request
PUT /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/configs HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 42
[ "b4829ff7-de84-4a81-8e2e-c866a3ef0d25" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:48 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.11. Remove All Configs From a Command
9.11.1. Description
Remove all the configuration file locations for an existing command.
9.11.2. Endpoint
DELETE /api/v3/commands/{id}/configs
9.11.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/configs' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/configs'
HTTP Messages
Request
DELETE /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/configs HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:43 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.12. Get Dependencies For an Command
9.12.1. Description
Get the dependency file locations for an command.
9.12.2. Endpoint
GET /api/v3/commands/{id}/dependencies
9.12.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/dependencies' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/dependencies'
Response Documentation
Headers
Name | Description |
---|---|
|
application/json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of dependency file locations |
false |
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/dependencies HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:47 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 82
[ "03680049-749c-4eb3-bef3-05a7ee6cf200", "bae1ca33-12a9-49f5-b3b0-b2f50c116bec" ]
9.13. Add Dependencies to Command
9.13.1. Description
Add dependency file locations to an existing command. Stored as a set so all duplicates are ignored.
9.13.2. Endpoint
POST /api/v3/commands/{id}/dependencies
9.13.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of dependency file locations |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/dependencies' -i -X POST \
-H 'Content-Type: application/json' \
-d '[ "03680049-749c-4eb3-bef3-05a7ee6cf200", "bae1ca33-12a9-49f5-b3b0-b2f50c116bec" ]'
HTTPie
$ echo '[ "03680049-749c-4eb3-bef3-05a7ee6cf200", "bae1ca33-12a9-49f5-b3b0-b2f50c116bec" ]' | http POST 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/dependencies' \
'Content-Type:application/json'
HTTP Messages
Request
POST /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/dependencies HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 82
[ "03680049-749c-4eb3-bef3-05a7ee6cf200", "bae1ca33-12a9-49f5-b3b0-b2f50c116bec" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:47 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.14. Update Dependencies for an Command
9.14.1. Description
Update the dependency file locations for an existing command
9.14.2. Endpoint
PUT /api/v3/commands/{id}/dependencies
9.14.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of dependency file locations |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/dependencies' -i -X PUT \
-H 'Content-Type: application/json' \
-d '[ "71ec436d-d60d-4a00-86cf-34e2b4efa4e4" ]'
HTTPie
$ echo '[ "71ec436d-d60d-4a00-86cf-34e2b4efa4e4" ]' | http PUT 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/dependencies' \
'Content-Type:application/json'
HTTP Messages
Request
PUT /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/dependencies HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 42
[ "71ec436d-d60d-4a00-86cf-34e2b4efa4e4" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:47 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.15. Remove All Dependencies From an Command
9.15.1. Description
Remove all the dependency file locations for an existing command.
9.15.2. Endpoint
DELETE /api/v3/commands/{id}/dependencies
9.15.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/dependencies' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/dependencies'
HTTP Messages
Request
DELETE /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/dependencies HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:46 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.16. Get Tags For a Command
9.16.1. Description
Get the tags for a command.
9.16.2. Endpoint
GET /api/v3/commands/{id}/tags
9.16.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/tags' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/tags'
Response Documentation
Headers
Name | Description |
---|---|
|
application/json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of tags |
false |
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/tags HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:49 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 150
[ "genie.name:hive", "dd39c757-0ac6-446f-a1b1-d2bf3b87b553", "3eeaab23-1bbd-4ab8-adcb-80c68acca968", "genie.id:4bb702f0-b2b4-4615-b158-1998bc80dc99" ]
9.17. Add Tags to Command
9.17.1. Description
Add tags to an existing command. Stored as a set so all duplicates are ignored.
genie.id:{id} and genie.name:{name} tags are automatically added by the service.
|
9.17.2. Endpoint
POST /api/v3/commands/{id}/tags
9.17.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of tags |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/tags' -i -X POST \
-H 'Content-Type: application/json' \
-d '[ "3eeaab23-1bbd-4ab8-adcb-80c68acca968", "dd39c757-0ac6-446f-a1b1-d2bf3b87b553" ]'
HTTPie
$ echo '[ "3eeaab23-1bbd-4ab8-adcb-80c68acca968", "dd39c757-0ac6-446f-a1b1-d2bf3b87b553" ]' | http POST 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/tags' \
'Content-Type:application/json'
HTTP Messages
Request
POST /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/tags HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 82
[ "3eeaab23-1bbd-4ab8-adcb-80c68acca968", "dd39c757-0ac6-446f-a1b1-d2bf3b87b553" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:49 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.18. Update Tags for a Command
9.18.1. Description
Update the tags for an existing command.
The genie.id:{id} and genie.name:{name} tags can’t be removed. They will automatically be added back
by the system.
|
9.18.2. Endpoint
PUT /api/v3/commands/{id}/tags
9.18.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of tags |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/tags' -i -X PUT \
-H 'Content-Type: application/json' \
-d '[ "c5e5a729-ba59-40a1-8570-d6a47cdf24c4" ]'
HTTPie
$ echo '[ "c5e5a729-ba59-40a1-8570-d6a47cdf24c4" ]' | http PUT 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/tags' \
'Content-Type:application/json'
HTTP Messages
Request
PUT /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/tags HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 42
[ "c5e5a729-ba59-40a1-8570-d6a47cdf24c4" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:49 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.19. Remove All Tags From Command
9.19.1. Description
Remove all the tags for an existing command
The genie.id:{id} and genie.name:{name} tags will NOT be removed by this operation
|
9.19.2. Endpoint
DELETE /api/v3/commands/{id}/tags
9.19.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/tags' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/tags'
HTTP Messages
Request
DELETE /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/tags HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:43 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.20. Remove Tag From Command
9.20.1. Description
Remove a tag from an existing command.
You can’t remove the genie.id:{id} and genie.name:{name} tags. They will just be added back by the system
|
9.20.2. Endpoint
DELETE /api/v3/commands/{id}/tags/{tag}
9.20.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
|
The tag to remove |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/tags/de0c0b12-5eac-499c-971b-01d5db2ae513' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/tags/de0c0b12-5eac-499c-971b-01d5db2ae513'
HTTP Messages
Request
DELETE /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/tags/de0c0b12-5eac-499c-971b-01d5db2ae513 HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:49 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.21. Add Applications to a Command
9.21.1. Description
Add new applications (as array of their ID’s) to the existing set of applications the command depends on
The applications for the ID’s must already exist in the system |
9.21.2. Endpoint
POST /api/v3/commands/{id}/applications
9.21.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of application ids to add to existing set of applications |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/applications' -i -X POST \
-H 'Content-Type: application/json' \
-d '[ "e3f7985b-c590-4d69-ae83-967f59b28ee9", "2b00558e-849e-4a46-84d0-10fae6e5f52f" ]'
HTTPie
$ echo '[ "e3f7985b-c590-4d69-ae83-967f59b28ee9", "2b00558e-849e-4a46-84d0-10fae6e5f52f" ]' | http POST 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/applications' \
'Content-Type:application/json'
HTTP Messages
Request
POST /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/applications HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 82
[ "e3f7985b-c590-4d69-ae83-967f59b28ee9", "2b00558e-849e-4a46-84d0-10fae6e5f52f" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:46 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.22. Get the Applications for a Command
9.22.1. Description
Get the applications the command currently depends on. These are the applications that will be installed at runtime when a job is run with the given command
9.22.2. Endpoint
GET /api/v3/commands/{id}/applications
9.22.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/applications' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/applications'
Response Documentation
Headers
Name | Description |
---|---|
|
application/hal+json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
The set of applications this command depends on |
false |
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/applications HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:46 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 2540
[ {
"id" : "e3f7985b-c590-4d69-ae83-967f59b28ee9",
"created" : "2024-07-11T18:59:46.920Z",
"updated" : "2024-07-11T18:59:46.920Z",
"version" : "ded7ef88-d946-4913-9336-9ca884d95e6d",
"user" : "ded7ef88-d946-4913-9336-9ca884d95e6d",
"name" : "ded7ef88-d946-4913-9336-9ca884d95e6d",
"description" : null,
"metadata" : null,
"tags" : [ "genie.id:e3f7985b-c590-4d69-ae83-967f59b28ee9", "genie.name:ded7ef88-d946-4913-9336-9ca884d95e6d" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "ACTIVE",
"type" : null,
"links" : [ {
"rel" : "self",
"href" : "https://genie.example.com/api/v3/applications/e3f7985b-c590-4d69-ae83-967f59b28ee9"
}, {
"rel" : "commands",
"href" : "https://genie.example.com/api/v3/applications/e3f7985b-c590-4d69-ae83-967f59b28ee9/commands{?status}"
} ]
}, {
"id" : "2b00558e-849e-4a46-84d0-10fae6e5f52f",
"created" : "2024-07-11T18:59:46.931Z",
"updated" : "2024-07-11T18:59:46.931Z",
"version" : "ded7ef88-d946-4913-9336-9ca884d95e6d",
"user" : "ded7ef88-d946-4913-9336-9ca884d95e6d",
"name" : "ded7ef88-d946-4913-9336-9ca884d95e6d",
"description" : null,
"metadata" : null,
"tags" : [ "genie.id:2b00558e-849e-4a46-84d0-10fae6e5f52f", "genie.name:ded7ef88-d946-4913-9336-9ca884d95e6d" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "ACTIVE",
"type" : null,
"links" : [ {
"rel" : "self",
"href" : "https://genie.example.com/api/v3/applications/2b00558e-849e-4a46-84d0-10fae6e5f52f"
}, {
"rel" : "commands",
"href" : "https://genie.example.com/api/v3/applications/2b00558e-849e-4a46-84d0-10fae6e5f52f/commands{?status}"
} ]
}, {
"id" : "cf42dad1-2509-478e-bcfd-a731ba211ef9",
"created" : "2024-07-11T18:59:47.032Z",
"updated" : "2024-07-11T18:59:47.032Z",
"version" : "ded7ef88-d946-4913-9336-9ca884d95e6d",
"user" : "ded7ef88-d946-4913-9336-9ca884d95e6d",
"name" : "ded7ef88-d946-4913-9336-9ca884d95e6d",
"description" : null,
"metadata" : null,
"tags" : [ "genie.id:cf42dad1-2509-478e-bcfd-a731ba211ef9", "genie.name:ded7ef88-d946-4913-9336-9ca884d95e6d" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "ACTIVE",
"type" : null,
"links" : [ {
"rel" : "self",
"href" : "https://genie.example.com/api/v3/applications/cf42dad1-2509-478e-bcfd-a731ba211ef9"
}, {
"rel" : "commands",
"href" : "https://genie.example.com/api/v3/applications/cf42dad1-2509-478e-bcfd-a731ba211ef9/commands{?status}"
} ]
} ]
9.23. Set Applications for a Command
9.23.1. Description
Set the applications (as array of their ID’s) that are dependencies of the command.
The applications with the ID’s must already exist in the system |
9.23.2. Endpoint
PUT /api/v3/commands/{id}/applications
9.23.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
Array of application ids to replace the existing set of applications with |
false |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/applications' -i -X PUT \
-H 'Content-Type: application/json' \
-d '[ "1e65bb43-0bfc-43b9-a460-ca2e87658c4e", "0da08e54-8b73-4d1c-aed1-fe8b6b654c99" ]'
HTTPie
$ echo '[ "1e65bb43-0bfc-43b9-a460-ca2e87658c4e", "0da08e54-8b73-4d1c-aed1-fe8b6b654c99" ]' | http PUT 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/applications' \
'Content-Type:application/json'
HTTP Messages
Request
PUT /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/applications HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 82
[ "1e65bb43-0bfc-43b9-a460-ca2e87658c4e", "0da08e54-8b73-4d1c-aed1-fe8b6b654c99" ]
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:48 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.24. Remove All Applications From a Command
9.24.1. Description
Remove all the applications currently set as dependencies of the command
This does NOT delete the application(s) from the system just unlinks them |
9.24.2. Endpoint
DELETE /api/v3/commands/{id}/applications
9.24.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/applications' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/applications'
HTTP Messages
Request
DELETE /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/applications HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:49 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.25. Remove A Single Application From a Command
9.25.1. Description
Remove the identified application as a dependency of the command.
This does NOT delete the application from the system just un-links it |
9.25.2. Endpoint
DELETE /api/v3/commands/{id}/applications/{applicationId}
9.25.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
|
The id of the application to remove |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/applications/58f2c709-1d41-4852-9d80-9b490146eca4' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/applications/58f2c709-1d41-4852-9d80-9b490146eca4'
HTTP Messages
Request
DELETE /api/v3/commands/4bb702f0-b2b4-4615-b158-1998bc80dc99/applications/58f2c709-1d41-4852-9d80-9b490146eca4 HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 204 No Content
Date: Thu, 11 Jul 2024 18:59:49 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.26. Get the Clusters that Have Command Available
9.26.1. Description
Search the clusters that the given command is linked to.
9.26.2. Endpoint
GET /api/v3/commands/{id}/clusters
9.26.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
Parameter | Description |
---|---|
|
The status of clusters to search for |
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/6ddcc8bd-a3ad-4957-ac19-9d597bb6fcbb/clusters?status=UP' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/commands/6ddcc8bd-a3ad-4957-ac19-9d597bb6fcbb/clusters?status=UP'
Response Documentation
Headers
Name | Description |
---|---|
|
application/hal+json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
The list of clusters found |
false |
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/commands/6ddcc8bd-a3ad-4957-ac19-9d597bb6fcbb/clusters?status=UP HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:47 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 819
[ {
"id" : "b0d2e20e-7a22-4ee2-9643-cb07fbbe44bc",
"created" : "2024-07-11T18:59:48.042Z",
"updated" : "2024-07-11T18:59:48.042Z",
"version" : "f64e2a45-fe7f-4567-bc74-bf9578932a4f",
"user" : "f64e2a45-fe7f-4567-bc74-bf9578932a4f",
"name" : "f64e2a45-fe7f-4567-bc74-bf9578932a4f",
"description" : null,
"metadata" : null,
"tags" : [ "genie.name:f64e2a45-fe7f-4567-bc74-bf9578932a4f", "genie.id:b0d2e20e-7a22-4ee2-9643-cb07fbbe44bc" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "UP",
"links" : [ {
"rel" : "self",
"href" : "https://genie.example.com/api/v3/clusters/b0d2e20e-7a22-4ee2-9643-cb07fbbe44bc"
}, {
"rel" : "commands",
"href" : "https://genie.example.com/api/v3/clusters/b0d2e20e-7a22-4ee2-9643-cb07fbbe44bc/commands{?status}"
} ]
} ]
9.27. Get the Cluster Criteria for a Command
9.27.1. Description
Get the priority ordered list of criteria associated with this command that say what attributes a cluster needs to have in order for this command to work on that cluster.
9.27.2. Endpoint
GET /api/v3/commands/{id}/clusterCriteria
9.27.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/9eac2bae-e268-4bb9-8360-69fa8c8a11bc/clusterCriteria' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/commands/9eac2bae-e268-4bb9-8360-69fa8c8a11bc/clusterCriteria'
Response Documentation
Headers
Name | Description |
---|---|
|
application/json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
A priority ordered list of criteria |
true |
|
[].id |
String |
The unique identifier a resource needs to have to match this criterion |
true |
|
[].name |
String |
The name a resource needs to have to match this criterion |
true |
|
[].version |
String |
The version a resource needs to have to match this criterion |
true |
|
[].status |
String |
The status a resource needs to have to match this criterion |
true |
|
[].tags |
Array |
The set of tags a resource needs to have to match this criterion |
true |
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/commands/9eac2bae-e268-4bb9-8360-69fa8c8a11bc/clusterCriteria HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:48 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 455
[ {
"id" : "f1baa442-ff99-4efb-8ac3-9aded31eb32a",
"name" : null,
"version" : null,
"status" : null,
"tags" : [ "8be8d47c-ad83-4699-8ac9-e32f8113adf2", "9e44dddc-2a9e-44d3-83b1-41021e79fb14" ]
}, {
"id" : "2bfdf650-2eb1-49b6-a2ab-83a21c176701",
"name" : "prod",
"version" : "1.0.0",
"status" : "UP",
"tags" : [ "67ccaff6-ad32-4cf3-a677-7c6464b8778f", "2b98196a-6c16-42b4-b693-5409b0a87a28", "11f05a2e-4ef9-4f53-bd48-a8a0e44572d0" ]
} ]
9.28. Remove all the Cluster Criteria From a Command
9.28.1. Description
Remove all the existing cluster criteria from a given command.
9.28.2. Endpoint
DELETE /api/v3/commands/{id}/clusterCriteria
9.28.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/f2daada7-b1c3-4166-8b3d-0e04fe8df6bf/clusterCriteria' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/commands/f2daada7-b1c3-4166-8b3d-0e04fe8df6bf/clusterCriteria'
HTTP Messages
Request
DELETE /api/v3/commands/f2daada7-b1c3-4166-8b3d-0e04fe8df6bf/clusterCriteria HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Date: Thu, 11 Jul 2024 18:59:43 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.29. Add a New Cluster Criterion For Command
9.29.1. Description
Add a new cluster criterion to the existing list of cluster criterion for the given command. The new criterion will have the lowest priority of all the criterion.
9.29.2. Endpoint
POST /api/v3/commands/{id}/clusterCriteria
9.29.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The unique identifier a resource needs to have to match this criterion |
true |
|
name |
String |
The name a resource needs to have to match this criterion |
true |
|
version |
String |
The version a resource needs to have to match this criterion |
true |
|
status |
String |
The status a resource needs to have to match this criterion |
true |
|
tags |
Array |
The set of tags a resource needs to have to match this criterion |
true |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/2a6969e6-6c6c-4909-bffc-0e8847b10d19/clusterCriteria' -i -X POST \
-H 'Content-Type: application/json' \
-d '{
"id" : "509e5c76-40c7-41fc-b2b8-602843382b61",
"name" : "adhocCluster",
"version" : "3.0.0",
"status" : "UP",
"tags" : [ "sched:adhoc", "type:yarn" ]
}'
HTTPie
$ echo '{
"id" : "509e5c76-40c7-41fc-b2b8-602843382b61",
"name" : "adhocCluster",
"version" : "3.0.0",
"status" : "UP",
"tags" : [ "sched:adhoc", "type:yarn" ]
}' | http POST 'https://genie.example.com/api/v3/commands/2a6969e6-6c6c-4909-bffc-0e8847b10d19/clusterCriteria' \
'Content-Type:application/json'
HTTP Messages
Request
POST /api/v3/commands/2a6969e6-6c6c-4909-bffc-0e8847b10d19/clusterCriteria HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 163
{
"id" : "509e5c76-40c7-41fc-b2b8-602843382b61",
"name" : "adhocCluster",
"version" : "3.0.0",
"status" : "UP",
"tags" : [ "sched:adhoc", "type:yarn" ]
}
Response
HTTP/1.1 200 OK
Date: Thu, 11 Jul 2024 18:59:49 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.30. Set Cluster Criteria For Command
9.30.1. Description
Replace the existing cluster criteria for a command with a new list. The criterion are added to the command in the same order they are passed to the service. This is the priority order they will be evaluated in.
9.30.2. Endpoint
PUT /api/v3/commands/{id}/clusterCriteria
9.30.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
A priority ordered list of criteria |
true |
|
[].id |
String |
The unique identifier a resource needs to have to match this criterion |
true |
|
[].name |
String |
The name a resource needs to have to match this criterion |
true |
|
[].version |
String |
The version a resource needs to have to match this criterion |
true |
|
[].status |
String |
The status a resource needs to have to match this criterion |
true |
|
[].tags |
Array |
The set of tags a resource needs to have to match this criterion |
true |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/2248743d-393d-4e55-8701-12b865117ddc/clusterCriteria' -i -X PUT \
-H 'Content-Type: application/json' \
-d '[ {
"id" : "52638510-2e75-4241-81d5-30a19799b3a1",
"name" : null,
"version" : null,
"status" : null,
"tags" : [ ]
}, {
"id" : null,
"name" : null,
"version" : "e6aac719-4533-4ff2-b40f-676c916673b6",
"status" : null,
"tags" : [ ]
}, {
"id" : null,
"name" : "50d6b00c-e419-4e8e-b5aa-a52610f695b4",
"version" : null,
"status" : null,
"tags" : [ ]
} ]'
HTTPie
$ echo '[ {
"id" : "52638510-2e75-4241-81d5-30a19799b3a1",
"name" : null,
"version" : null,
"status" : null,
"tags" : [ ]
}, {
"id" : null,
"name" : null,
"version" : "e6aac719-4533-4ff2-b40f-676c916673b6",
"status" : null,
"tags" : [ ]
}, {
"id" : null,
"name" : "50d6b00c-e419-4e8e-b5aa-a52610f695b4",
"version" : null,
"status" : null,
"tags" : [ ]
} ]' | http PUT 'https://genie.example.com/api/v3/commands/2248743d-393d-4e55-8701-12b865117ddc/clusterCriteria' \
'Content-Type:application/json'
HTTP Messages
Request
PUT /api/v3/commands/2248743d-393d-4e55-8701-12b865117ddc/clusterCriteria HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 377
[ {
"id" : "52638510-2e75-4241-81d5-30a19799b3a1",
"name" : null,
"version" : null,
"status" : null,
"tags" : [ ]
}, {
"id" : null,
"name" : null,
"version" : "e6aac719-4533-4ff2-b40f-676c916673b6",
"status" : null,
"tags" : [ ]
}, {
"id" : null,
"name" : "50d6b00c-e419-4e8e-b5aa-a52610f695b4",
"version" : null,
"status" : null,
"tags" : [ ]
} ]
Response
HTTP/1.1 200 OK
Date: Thu, 11 Jul 2024 18:59:46 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.31. Insert a New Cluster Criterion For Command
9.31.1. Description
Add a new Criterion to the existing list of cluster criteria for the command identified by id
.
The priority
is the place in the list this new criterion should be placed.
A value of 0
indicates it should be placed at the front of the list with the highest possible priority.
1
would be second in the list etc.
If priority
is >
the current size of the cluster criteria list this new criterion will be placed at the end as the lowest priority item.
Priority must be >= 0
.
9.31.2. Endpoint
PUT /api/v3/commands/{id}/clusterCriteria/{priority}
9.31.3. API Docs
Request Documentation
Headers
Name | Description |
---|---|
|
application/json |
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
|
Priority of the criterion to insert |
Query Parameters
None
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
id |
String |
The unique identifier a resource needs to have to match this criterion |
true |
|
name |
String |
The name a resource needs to have to match this criterion |
true |
|
version |
String |
The version a resource needs to have to match this criterion |
true |
|
status |
String |
The status a resource needs to have to match this criterion |
true |
|
tags |
Array |
The set of tags a resource needs to have to match this criterion |
true |
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/70a881c8-032c-4c6a-ada6-035201fb7473/clusterCriteria/1' -i -X PUT \
-H 'Content-Type: application/json' \
-d '{
"id" : "71e8a53c-1b60-4b0f-8144-f327786d38c8",
"name" : "insightCluster",
"version" : "4.0.0",
"status" : "OUT_OF_SERVICE",
"tags" : [ "type:presto", "sched:insights" ]
}'
HTTPie
$ echo '{
"id" : "71e8a53c-1b60-4b0f-8144-f327786d38c8",
"name" : "insightCluster",
"version" : "4.0.0",
"status" : "OUT_OF_SERVICE",
"tags" : [ "type:presto", "sched:insights" ]
}' | http PUT 'https://genie.example.com/api/v3/commands/70a881c8-032c-4c6a-ada6-035201fb7473/clusterCriteria/1' \
'Content-Type:application/json'
HTTP Messages
Request
PUT /api/v3/commands/70a881c8-032c-4c6a-ada6-035201fb7473/clusterCriteria/1 HTTP/1.1
Content-Type: application/json
Host: genie.example.com
Content-Length: 182
{
"id" : "71e8a53c-1b60-4b0f-8144-f327786d38c8",
"name" : "insightCluster",
"version" : "4.0.0",
"status" : "OUT_OF_SERVICE",
"tags" : [ "type:presto", "sched:insights" ]
}
Response
HTTP/1.1 200 OK
Date: Thu, 11 Jul 2024 18:59:47 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.32. Remove the Cluster Criterion From a Command
9.32.1. Description
Remove the Criterion
with the given priority
from the current list of cluster criteria associated with the command identified by id
.
A value of 0
for priority
will result in the first element in the list being removed, 1
the second element and so on.
0 ⇐ priority < current criteria length
|
9.32.2. Endpoint
DELETE /api/v3/commands/{id}/clusterCriteria/{priority}
9.32.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
|
Priority of the criterion to insert |
Query Parameters
None
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/f931869f-ce93-4b03-bfd4-ed02e4c416d0/clusterCriteria/1' -i -X DELETE
HTTPie
$ http DELETE 'https://genie.example.com/api/v3/commands/f931869f-ce93-4b03-bfd4-ed02e4c416d0/clusterCriteria/1'
HTTP Messages
Request
DELETE /api/v3/commands/f931869f-ce93-4b03-bfd4-ed02e4c416d0/clusterCriteria/1 HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Date: Thu, 11 Jul 2024 18:59:47 GMT
Keep-Alive: timeout=60
Connection: keep-alive
9.33. Resolve Clusters for Command Cluster Criteria
9.33.1. Description
For a given Command
resolve the Clusters
which each of the Commands
clusterCriteria
would resolve
if they were evaluated against the current contents of the database.
9.33.2. Endpoint
GET /api/v3/commands/{id}/resolvedClusters
9.33.3. API Docs
Request Documentation
Headers
None
Path Parameters
Parameter | Description |
---|---|
|
The resource id |
Query Parameters
Parameter | Description |
---|---|
|
Whether the system should add the default cluster status to the criteria. Default: true |
Payload Fields
None
Request Examples
cURL
$ curl 'https://genie.example.com/api/v3/commands/75e75694-6c03-4cef-9562-8c6e2ba351ad/resolvedClusters' -i -X GET
HTTPie
$ http GET 'https://genie.example.com/api/v3/commands/75e75694-6c03-4cef-9562-8c6e2ba351ad/resolvedClusters'
Response Documentation
Headers
Name | Description |
---|---|
|
application/json |
Payload Fields
Path | Type | Description | Constraints | Optional |
---|---|---|---|---|
[] |
Array |
The list of criterion and associated resolved clusters |
true |
|
[].criterion |
Object |
The criterion that was evaluated to yield the resources |
false |
|
[].resources |
Array |
The resources that were resolved by evaluating the criterion |
false |
|
[].criterion.id |
String |
The unique identifier a resource needs to have to match this criterion |
true |
|
[].criterion.name |
String |
The name a resource needs to have to match this criterion |
true |
|
[].criterion.version |
String |
The version a resource needs to have to match this criterion |
true |
|
[].criterion.status |
String |
The status a resource needs to have to match this criterion |
true |
|
[].criterion.tags |
Array |
The set of tags a resource needs to have to match this criterion |
true |
|
[].resources[].id |
String |
The id. If not set the system will set one. |
Size must be between 0 and 255 inclusive |
true |
[].resources[].created |
String |
The UTC time of creation. Set by system. ISO8601 format including milliseconds. |
true |
|
[].resources[].updated |
String |
The UTC time of last update. Set by system. ISO8601 format including milliseconds. |
true |
|
[].resources[].name |
String |
The name |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
[].resources[].user |
String |
The user |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
[].resources[].version |
String |
The version |
Must not be empty. Size must be between 0 and 255 inclusive |
false |
[].resources[].description |
String |
Any description |
Size must be between 0 and 1000 inclusive |
true |
[].resources[].metadata |
Object |
Any semi-structured metadata. Must be valid JSON |
true |
|
[].resources[].tags |
Array |
The tags |
true |
|
[].resources[].setupFile |
String |
A location for any setup that needs to be done when installing |
Size must be between 0 and 1024 inclusive |
true |
[].resources[].configs |
Array |
Any configuration files needed for the resource |
true |
|
[].resources[].status |
String |
The status of the cluster. Options: [UP, OUT_OF_SERVICE, TERMINATED] |
Must not be null |
false |
[].resources[].dependencies |
Array |
The dependencies for the cluster |
true |
HATEOAS Links
None
HTTP Messages
Request
GET /api/v3/commands/75e75694-6c03-4cef-9562-8c6e2ba351ad/resolvedClusters HTTP/1.1
Host: genie.example.com
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Thu, 11 Jul 2024 18:59:49 GMT
Keep-Alive: timeout=60
Connection: keep-alive
Content-Length: 4132
[ {
"criterion" : {
"id" : "02171aa4-1b1f-4dee-9c88-eb2ab43a111a",
"name" : null,
"version" : null,
"status" : null,
"tags" : [ ]
},
"resources" : [ {
"id" : "02171aa4-1b1f-4dee-9c88-eb2ab43a111a",
"created" : "2024-07-11T18:59:49.341Z",
"updated" : "2024-07-11T18:59:49.341Z",
"version" : "50a1ba26-20f2-4a77-a325-c6b74f07dded",
"user" : "a3f61738-5533-4a48-9289-bc619e793bd7",
"name" : "0d4f580a-9cb2-4c0a-9293-638f3ae4db46",
"description" : null,
"metadata" : null,
"tags" : [ "8c43df9c-4b6a-4d78-9cd8-f447d9038632", "55af9480-3390-4efb-be01-95896ab8662f", "genie.id:02171aa4-1b1f-4dee-9c88-eb2ab43a111a", "genie.name:0d4f580a-9cb2-4c0a-9293-638f3ae4db46" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "UP"
} ]
}, {
"criterion" : {
"id" : null,
"name" : "0d4f580a-9cb2-4c0a-9293-638f3ae4db46",
"version" : null,
"status" : null,
"tags" : [ ]
},
"resources" : [ {
"id" : "02171aa4-1b1f-4dee-9c88-eb2ab43a111a",
"created" : "2024-07-11T18:59:49.341Z",
"updated" : "2024-07-11T18:59:49.341Z",
"version" : "50a1ba26-20f2-4a77-a325-c6b74f07dded",
"user" : "a3f61738-5533-4a48-9289-bc619e793bd7",
"name" : "0d4f580a-9cb2-4c0a-9293-638f3ae4db46",
"description" : null,
"metadata" : null,
"tags" : [ "8c43df9c-4b6a-4d78-9cd8-f447d9038632", "55af9480-3390-4efb-be01-95896ab8662f", "genie.id:02171aa4-1b1f-4dee-9c88-eb2ab43a111a", "genie.name:0d4f580a-9cb2-4c0a-9293-638f3ae4db46" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "UP"
}, {
"id" : "224943cd-4775-4df9-a2ed-e0e8ddec93fa",
"created" : "2024-07-11T18:59:49.352Z",
"updated" : "2024-07-11T18:59:49.352Z",
"version" : "50a1ba26-20f2-4a77-a325-c6b74f07dded",
"user" : "a3f61738-5533-4a48-9289-bc619e793bd7",
"name" : "0d4f580a-9cb2-4c0a-9293-638f3ae4db46",
"description" : null,
"metadata" : null,
"tags" : [ "8c43df9c-4b6a-4d78-9cd8-f447d9038632", "genie.id:224943cd-4775-4df9-a2ed-e0e8ddec93fa", "55af9480-3390-4efb-be01-95896ab8662f", "genie.name:0d4f580a-9cb2-4c0a-9293-638f3ae4db46" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "UP"
} ]
}, {
"criterion" : {
"id" : null,
"name" : null,
"version" : "823d7acf-9191-4b70-aa12-fa976c7b345b",
"status" : null,
"tags" : [ ]
},
"resources" : [ {
"id" : "020060b1-125c-4306-9121-688e66746a76",
"created" : "2024-07-11T18:59:49.364Z",
"updated" : "2024-07-11T18:59:49.364Z",
"version" : "823d7acf-9191-4b70-aa12-fa976c7b345b",
"user" : "9ff12d30-030d-4ec1-af32-8d639bd46c80",
"name" : "035f7e3c-b635-4828-b35d-7da541da10af",
"description" : null,
"metadata" : null,
"tags" : [ "dcf074b2-9cf8-41c7-835e-ccfc65a6dd5c", "genie.name:035f7e3c-b635-4828-b35d-7da541da10af", "4e7ae618-31cc-4d71-b334-745be2b45d6b", "genie.id:020060b1-125c-4306-9121-688e66746a76" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "UP"
} ]
}, {
"criterion" : {
"id" : null,
"name" : null,
"version" : null,
"status" : "TERMINATED",
"tags" : [ ]
},
"resources" : [ ]
}, {
"criterion" : {
"id" : null,
"name" : null,
"version" : null,
"status" : null,
"tags" : [ "dcf074b2-9cf8-41c7-835e-ccfc65a6dd5c", "4e7ae618-31cc-4d71-b334-745be2b45d6b" ]
},
"resources" : [ {
"id" : "020060b1-125c-4306-9121-688e66746a76",
"created" : "2024-07-11T18:59:49.364Z",
"updated" : "2024-07-11T18:59:49.364Z",
"version" : "823d7acf-9191-4b70-aa12-fa976c7b345b",
"user" : "9ff12d30-030d-4ec1-af32-8d639bd46c80",
"name" : "035f7e3c-b635-4828-b35d-7da541da10af",
"description" : null,
"metadata" : null,
"tags" : [ "dcf074b2-9cf8-41c7-835e-ccfc65a6dd5c", "genie.name:035f7e3c-b635-4828-b35d-7da541da10af", "4e7ae618-31cc-4d71-b334-745be2b45d6b", "genie.id:020060b1-125c-4306-9121-688e66746a76" ],
"configs" : [ ],
"dependencies" : [ ],
"setupFile" : null,
"status" : "UP"
} ]
} ]