Step 1: Create a worker application

POST {{apiPath}}/environments/{{envID}}/applications

You can use the POST /environments/{{envID}}/applications endpoint to create the new worker application. For an interactive worker application, the following properties must be set:

  • The application's type property is set to WORKER.
  • The application's protocol property is set to OPENID_CONNECT.
  • The application's grantTypes property array is set to CLIENT_CREDENTIALS, and AUTHORIZATION_CODE.
  • The application's responseTypes property array is set to CODE.
  • The application's tokenEndpointAuthMethod property is set to CLIENT_SECRET_BASIC, which specifies that the clientID/clientSecret is used to authentication the token request.

Note: The grantTypes property also supports the IMPLICIT type for interactive worker applications. If the IMPLICIT grant type is specified, the responseTypes property must include either the TOKEN or ID_TOKEN or both values.

The response data returns information about the new application, including its id property, which identifies the UUID for this application resource. The application's ID is needed in Step 3 to get the role assignments, Step 12 to make the authorization request, and in Step 16 for the token request.

Request Body

{"enabled"=>true, "name"=>"InteractiveWorkerApp_{{$timestamp}}", "description"=>"Test Description - Interactive Worker App", "type"=>"WORKER", "protocol"=>"OPENID_CONNECT", "homePageUrl"=>"https://example.com/homePage", "loginPageUrl"=>"https://example.com/loginPage", "grantTypes"=>["CLIENT_CREDENTIALS", "AUTHORIZATION_CODE"], "postLogoutRedirectUris"=>["https://example.com/logout"], "redirectUris"=>["https://example.com"], "responseTypes"=>["CODE"], "tokenEndpointAuthMethod"=>"CLIENT_SECRET_BASIC", "pkceEnforcement"=>"OPTIONAL", "refreshTokenDuration"=>86400, "refreshTokenRollingDuration"=>86400}

HEADERS

KeyDatatypeRequiredDescription
Authorizationstring
Content-Typestring