{"security":[{"BearerAuth":[]}],"tags":[{"name":"stacks","description":"Stack provisioning and lifecycle management."}],"paths":{"/v1/stacks":{"post":{"description":"Create a short-lived Splunk stack. Omit `splunkVersion` or pass `{}` to use the default latest released version.","operationId":"createStack","requestBody":{"$ref":"#/components/requestBodies/CreateStackRequestBody"},"tags":["stacks"],"responses":{"202":{"description":"Stack creation accepted. The returned stack's `state` is `CREATING` when provisioning is in progress, or `RUNNING` if the stack is already up and running.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackSummary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"500":{"$ref":"#/components/responses/InternalServerError"}},"summary":"Create stack"},"get":{"summary":"List stacks","description":"List active stacks owned by the authenticated user.","operationId":"listStacks","tags":["stacks"],"responses":{"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"},"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackListResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/stacks/versions":{"get":{"summary":"List stack versions","description":"List available Splunk versions for stack creation.","operationId":"listStackVersions","tags":["stacks"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackVersionsResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}},"/v1/stacks/{stackId}":{"parameters":[{"$ref":"#/components/parameters/StackId"}],"get":{"summary":"Get stack","description":"Retrieve state, lifecycle timestamps, version, and access details for a stack owned by the authenticated user.","operationId":"getStack","tags":["stacks"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackDetail"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}},"delete":{"summary":"Delete stack","description":"Delete a stack owned by the authenticated user.","operationId":"deleteStack","tags":["stacks"],"responses":{"204":{"description":"Stack successfully removed."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Dev Portal API token","description":"Paste the Dev Portal API key. The OpenAPI UI sends it in the `Authorization` header."}},"responses":{"NotFound":{"content":{"application/json":{"examples":{"stackNotFound":{"$ref":"#/components/examples/StackNotFound"}},"schema":{"$ref":"#/components/schemas/ServiceError"}}},"description":"Stack not found."},"Conflict":{"description":"The request conflicts with the current service state.","content":{"application/json":{"examples":{"maxStacksLimitReached":{"$ref":"#/components/examples/MaxStacksLimitReached"}},"schema":{"$ref":"#/components/schemas/ServiceError"}}}},"InternalServerError":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceError"},"examples":{"internalServerError":{"$ref":"#/components/examples/InternalServerError"}}}}},"BadRequest":{"description":"The request is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceError"},"examples":{"invalidRequestBody":{"$ref":"#/components/examples/InvalidRequestBody"},"invalidSplunkVersion":{"$ref":"#/components/examples/InvalidSplunkVersion"}}}}},"Unauthorized":{"description":"The user isn't authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceError"},"examples":{"missingAPIKey":{"$ref":"#/components/examples/MissingAPIKey"}}}}},"Forbidden":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceError"},"examples":{"userNotWhitelisted":{"$ref":"#/components/examples/UserNotWhitelisted"}}}},"description":"The operation isn't authorized."}},"examples":{"UserNotWhitelisted":{"value":{"code":"Forbidden","message":"user not whitelisted"}},"StackNotFound":{"value":{"code":"NotFound","message":"resource not found"}},"MaxStacksLimitReached":{"value":{"message":"maximal stacks limit reached","code":"MaxStacksLimitReached"}},"InternalServerError":{"value":{"code":"InternalServerError","message":"Internal server error"}},"InvalidRequestBody":{"value":{"code":"InvalidRequest","message":"invalid request"}},"InvalidSplunkVersion":{"value":{"code":"InvalidRequest","message":"unknown splunk version: 9.9.9999.9"}},"MissingAPIKey":{"value":{"code":"Unauthorized","message":"missing API Key in request"}}},"parameters":{"StackId":{"name":"stackId","description":"The stack identifier.","in":"path","required":true,"schema":{"type":"string"}}},"requestBodies":{"CreateStackRequestBody":{"description":"Parameters for stack creation. Pass an empty object to use the default latest released version.","required":true,"content":{"application/json":{"examples":{"latestReleased":{"summary":"Use the default latest released version","value":{}}},"schema":{"$ref":"#/components/schemas/CreateStackRequest"}}}}},"schemas":{"StackState":{"enum":["CREATING","RUNNING","STOPPING","ERROR"],"type":"string"},"SplunkVersion":{"type":"object","required":["buildVersion","releaseName","status"],"example":{"buildVersion":"10.0.0","releaseName":"Example","status":"released"},"properties":{"buildVersion":{"description":"Splunk build version string.","type":"string"},"releaseName":{"description":"Release codename (e.g. Uno, Twix).","type":"string"},"status":{"description":"Release status.","type":"string","enum":["released","unreleased"]}}},"StackDetail":{"type":"object","required":["id","name","state","createdAt","terminationDate","splunkVersion"],"example":{"splunkVersion":"10.0.0","stackAccessDetails":{"url":"https://scts-example.splunkcloud.com","username":"admin","password":"generated-password"},"id":"scts-stack-123","name":"scts-example","state":"RUNNING","createdAt":"2026-09-03T12:00:00Z","terminationDate":"2026-09-10T12:00:00Z"},"properties":{"stackAccessDetails":{"description":"Splunk login details. Present only when the stack has access details available.","$ref":"#/components/schemas/StackAccessDetails"},"id":{"description":"Unique stack identifier.","type":"string"},"name":{"description":"Stack name.","type":"string"},"state":{"$ref":"#/components/schemas/StackState"},"createdAt":{"description":"ISO-8601 timestamp of stack creation.","type":"string","format":"date-time"},"terminationDate":{"description":"ISO-8601 timestamp when the stack will be terminated.","type":"string","format":"date-time"},"splunkVersion":{"type":"string","description":"Splunk version running on the stack."}}},"StackAccessDetails":{"type":"object","required":["url","username","password"],"example":{"url":"https://scts-example.splunkcloud.com","username":"admin","password":"generated-password"},"properties":{"url":{"type":"string","format":"uri","description":"Splunk web URL for the stack."},"username":{"description":"Username for Splunk web.","type":"string"},"password":{"description":"Password for Splunk web.","type":"string","format":"password"}}},"StackVersionsResponse":{"required":["versions"],"example":{"versions":[{"buildVersion":"10.0.0","releaseName":"Example","status":"released"}]},"properties":{"versions":{"type":"array","items":{"$ref":"#/components/schemas/SplunkVersion"}}},"type":"object"},"ServiceError":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Machine-readable service error code. The set of codes is extensible; clients must handle unknown values."},"message":{"description":"Human readable error message","type":"string"}}},"CreateStackRequest":{"type":"object","example":{},"properties":{"splunkVersion":{"description":"Splunk build version to provision. Omit this field to use the default latest released version.","type":"string"}}},"StackListResponse":{"type":"object","required":["stacks"],"example":{"stacks":[{"id":"scts-stack-123","name":"scts-example","state":"RUNNING","createdAt":"2026-09-03T12:00:00Z","terminationDate":"2026-09-10T12:00:00Z","splunkVersion":"10.0.0"}]},"properties":{"stacks":{"type":"array","items":{"$ref":"#/components/schemas/StackSummary"}}}},"StackSummary":{"type":"object","required":["id","name","state","createdAt","terminationDate","splunkVersion"],"example":{"terminationDate":"2026-09-10T12:00:00Z","splunkVersion":"10.0.0","id":"scts-stack-123","name":"scts-example","state":"CREATING","createdAt":"2026-09-03T12:00:00Z"},"properties":{"id":{"type":"string","description":"Unique stack identifier."},"name":{"description":"Stack name.","type":"string"},"state":{"$ref":"#/components/schemas/StackState"},"createdAt":{"type":"string","format":"date-time","description":"ISO-8601 timestamp of stack creation."},"terminationDate":{"description":"ISO-8601 timestamp when the stack will be terminated.","type":"string","format":"date-time"},"splunkVersion":{"description":"Splunk version running on the stack.","type":"string"}}}}},"openapi":"3.0.0","info":{"title":"SCTS API","version":"v1.0","description":"Splunk Cloud Testing Sandbox API for provisioning and managing short-lived\nSplunk stacks.\n"},"servers":[{"description":"Production","url":"https://scts.dev.splunk.com"}]}