manage rotation scripts

get/secrets-manager/api/v1/script-templates

get all script templates

OAuth2 oauth

Required Scopes:

adminhostsViewservice

get all script templates

All Scopes

  • admin · Admin scope - used for built-in PrivX admin account
  • hostsManage · Clients with hosts-manage scope
  • hostsProvisioning · Deploy script users
  • hostsView · Clients with hosts-view scope
  • service · Microservice scope - used for communication between PrivX microservices
  • targetDomainsManage · Clients with target-domains-manage scope
  • targetDomainsView · Clients with target-domains-view scope
  • user · Normal users
Flow Type:
authorization_code
Auth URL:
https://api.x.com/v1/auth/auth
Token URL:
https://api.x.com/v1/auth/auth

Responses

Response examples

script template response

{
  "count": 123,
  "items": [
    {
      "id": "5bf77342-221c-11ee-be56-0242ac120002",
      "name": "string",
      "operating_system": "LINUX",
      "script": "string",
      "created": "2017-01-01T15:05:05Z",
      "updated": "2017-01-01T15:05:05Z",
      "created_by": "string",
      "updated_by": "string"
    }
  ]
}
post/secrets-manager/api/v1/script-template

insert a new script template to db

namestring
scriptstring

Responses

Request examples

{
  "name": "string",
  "script": "string"
}

Response examples

inserted

{
  "id": "5bf77342-221c-11ee-be56-0242ac120002"
}
get/secrets-manager/api/v1/script-template/{id}

get a script template

idstring

required

Responses

Response examples

scripts array

{
  "id": "5bf77342-221c-11ee-be56-0242ac120002",
  "name": "string",
  "operating_system": "LINUX",
  "script": "string",
  "created": "2017-01-01T15:05:05Z",
  "updated": "2017-01-01T15:05:05Z",
  "created_by": "string",
  "updated_by": "string"
}
put/secrets-manager/api/v1/script-template/{id}

update a script template

idstring
Format
uuid
namestring
operating_systemstring

powershell for windows and Unix Shell for Linux

Enum
  • LINUX
  • WINDOWS
scriptstring

script as string

createdstring

When the object was created. Added by backend

Format
date-time
Example
"2017-01-01T15:05:05Z"
updatedstring

When the object was updated. Added by backend

Format
date-time
Example
"2017-01-01T15:05:05Z"
created_bystring

added by backend

updated_bystring

added by backend

Responses

Request examples

{
  "id": "5bf77342-221c-11ee-be56-0242ac120002",
  "name": "string",
  "operating_system": "LINUX",
  "script": "string",
  "created": "2017-01-01T15:05:05Z",
  "updated": "2017-01-01T15:05:05Z",
  "created_by": "string",
  "updated_by": "string"
}

Response examples

inserted

{
  "id": "5bf77342-221c-11ee-be56-0242ac120002",
  "name": "string",
  "operating_system": "LINUX",
  "script": "string",
  "created": "2017-01-01T15:05:05Z",
  "updated": "2017-01-01T15:05:05Z",
  "created_by": "string",
  "updated_by": "string"
}
delete/secrets-manager/api/v1/script-template/{id}

delete a script template

idstring

required

Responses

Response examples

deleted

Empty response

post/secrets-manager/api/v1/script-template/compile

compile script with test data

operating_systemstring
Enum
  • LINUX
  • WINDOWS
scriptstring

Responses

Request examples

{
  "operating_system": "LINUX",
  "script": "string"
}

Response examples

example script

{
  "script": "string"
}

Was this page helpful?