Services

This contains APIs related to Services

Gets Service list

Securityx-api-key
Request
query Parameters
page
integer <int32>
Default: 0

Page Index of the results to fetch.Default Value: 0

size
integer <int32> <= 1000
Default: 100

Results per page

accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

searchTerm
string

The word to be searched and included in the list response

serviceIdentifiers
Array of strings

List of ServicesIds

sort
Array of strings

Specifies the sorting criteria of the list. Like sorting based on the last updated entity, alphabetical sorting in an ascending or descending order

type
string
Enum: "Kubernetes" "NativeHelm" "Ssh" "WinRm" "ServerlessAwsLambda" "AzureWebApp" "CustomDeployment" "ECS" "Elastigroup" "TAS" "Asg" "GoogleCloudFunctions" "AwsLambda" "AWS_SAM" "SERVICE_YAML_V1_TYPE"
gitOpsEnabled
boolean
deploymentTemplateIdentifier
string

The Identifier of deployment template if infrastructure is of type custom deployment

versionLabel
string

The version label of deployment template if infrastructure is of type custom deployment

includeAllServicesAccessibleAtScope
boolean
Default: false

Specify true if all accessible Services are to be included

Responses
400

Bad Request

500

Internal Server Error

default

Returns the list of Services for a Project

get/ng/api/servicesV2
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update a Service by identifier

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

header Parameters
If-Match
string
Request Body schema:
required

Details of the Service to be updated

identifier
string

Identifier of the Service Request.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

name
string

Name of the Service Request.

description
string

Description of the entity

object

Tags

yaml
string

YAML for the Service Request

Responses
400

Bad Request

500

Internal Server Error

default

Returns the updated Service

put/ng/api/servicesV2
Request samples

Sample Service payload

{
  • "name": "serviceName",
  • "identifier": "serviceId",
  • "tags": { },
  • "projectIdentifier": "s",
  • "orgIdentifier": "default",
  • "yaml": "service:\n name: serviceName\n identifier: serviceId\n tags: {}\n serviceDefinition:\n spec:\n artifacts:\n primary:\n primaryArtifactRef: artifactName\n sources:\n - spec:\n connectorRef: connectorId\n imagePath: imagePath\n tag: tagId\n identifier: artifactName\n type: DockerRegistry\n type: Kubernetes\n"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Create a Service

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

Request Body schema:
required

Details of the Service to be created

identifier
string

Identifier of the Service Request.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

name
string

Name of the Service Request.

description
string

Description of the entity

object

Tags

yaml
string

YAML for the Service Request

Responses
400

Bad Request

500

Internal Server Error

default

Returns the created Service

post/ng/api/servicesV2
Request samples

Sample Service payload

{
  • "name": "serviceName",
  • "identifier": "serviceId",
  • "tags": { },
  • "projectIdentifier": "s",
  • "orgIdentifier": "default",
  • "yaml": "service:\n name: serviceName\n identifier: serviceId\n tags: {}\n serviceDefinition:\n spec:\n artifacts:\n primary:\n primaryArtifactRef: artifactName\n sources:\n - spec:\n connectorRef: connectorId\n imagePath: imagePath\n tag: tagId\n identifier: artifactName\n type: DockerRegistry\n type: Kubernetes\n"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Create Services

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

Request Body schema:

Details of the Services to be created, maximum 1000 services can be created.

Array ([ 0 .. 1000 ] items)
identifier
string

Identifier of the Service Request.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

name
string

Name of the Service Request.

description
string

Description of the entity

object

Tags

yaml
string

YAML for the Service Request

Responses
400

Bad Request

500

Internal Server Error

default

Returns the created Services

post/ng/api/servicesV2/batch
Request samples
[
  • {
    }
]
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Gets a Service by identifier

Securityx-api-key
Request
path Parameters
serviceIdentifier
required
string

Service Identifier for the entity

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

deleted
boolean
Default: false

Specify whether Service is deleted or not

Responses
400

Bad Request

500

Internal Server Error

default

The saved Service

get/ng/api/servicesV2/{serviceIdentifier}
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Delete a Service by identifier

Securityx-api-key
Request
path Parameters
serviceIdentifier
required
string

Service Identifier for the entity

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

forceDelete
boolean
Default: false

If true, the Entity will be forced delete, without checking any references/usages

header Parameters
If-Match
string
Responses
400

Bad Request

500

Internal Server Error

default

Returns true if the Service is deleted

delete/ng/api/servicesV2/{serviceIdentifier}
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Retrieving the list of Kubernetes Command Options

Securityx-api-key
Request
query Parameters
serviceSpecType
required
string
Responses
400

Bad Request

500

Internal Server Error

default

Returns the list of Kubernetes Command Options

get/ng/api/servicesV2/k8s/command-flags
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Retrieving the list of Kustomize Command Flags

Securityx-api-key
Responses
400

Bad Request

500

Internal Server Error

default

Returns the list of Kustomize Command Flags

get/ng/api/servicesV2/kustomize/command-flags
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Retrieving the list of actions available for service hooks

Securityx-api-key
Request
query Parameters
serviceSpecType
required
string
Responses
400

Bad Request

500

Internal Server Error

default

Returns the list of actions available for service hooks

get/ng/api/servicesV2/hooks/actions
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Gets Service Access list

Securityx-api-key
Request
query Parameters
page
integer <int32>
Default: 0

Page Index of the results to fetch.Default Value: 0

size
integer <int32>
Default: 100

Results per page

accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

searchTerm
string

The word to be searched and included in the list response

serviceIdentifiers
Array of strings [ 0 .. 1000 ] items

List of ServicesIds

sort
Array of strings

Specifies the sorting criteria of the list. Like sorting based on the last updated entity, alphabetical sorting in an ascending or descending order

type
string
Enum: "Kubernetes" "NativeHelm" "Ssh" "WinRm" "ServerlessAwsLambda" "AzureWebApp" "CustomDeployment" "ECS" "Elastigroup" "TAS" "Asg" "GoogleCloudFunctions" "AwsLambda" "AWS_SAM" "SERVICE_YAML_V1_TYPE"
gitOpsEnabled
boolean
deploymentTemplateIdentifier
string

The Identifier of deployment template if infrastructure is of type custom deployment

versionLabel
string

The version label of deployment template if infrastructure is of type custom deployment

deploymentMetadataYaml
string
includeAllServicesAccessibleAtScope
boolean
Default: false

Specify true if all accessible Services are to be included

Responses
400

Bad Request

500

Internal Server Error

default

Returns the list of Services for a Project that are accessible

get/ng/api/servicesV2/list/access
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update git-metadata in remote service Entity

Update git-metadata in remote service and returns the identifier of updated service

Securityx-api-key
Request
path Parameters
serviceIdentifier
required
string

Service Identifier for the entity

query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

orgIdentifier
required
string

Organization Identifier for the Entity.

projectIdentifier
required
string

Project Identifier for the Entity.

connectorRef
string

Identifier of Connector needed for CRUD operations on the respective Entity

repoName
string

Name of the repository.

filePath
string

File Path of the Entity.

Responses
400

Bad Request

500

Internal Server Error

default

Returns identifier of updated Service

put/ng/api/servicesV2/{serviceIdentifier}/update-git-metadata
Request samples
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Upsert a Service by identifier

Securityx-api-key
Request
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity.

header Parameters
If-Match
string
Request Body schema:
required

Details of the Service to be upserted

identifier
string

Identifier of the Service Request.

orgIdentifier
string

Organization Identifier for the Entity.

projectIdentifier
string

Project Identifier for the Entity.

name
string

Name of the Service Request.

description
string

Description of the entity

object

Tags

yaml
string

YAML for the Service Request

Responses
400

Bad Request

500

Internal Server Error

default

Returns the updated Service

put/ng/api/servicesV2/upsert
Request samples

Sample Service payload

{
  • "name": "serviceName",
  • "identifier": "serviceId",
  • "tags": { },
  • "projectIdentifier": "s",
  • "orgIdentifier": "default",
  • "yaml": "service:\n name: serviceName\n identifier: serviceId\n tags: {}\n serviceDefinition:\n spec:\n artifacts:\n primary:\n primaryArtifactRef: artifactName\n sources:\n - spec:\n connectorRef: connectorId\n imagePath: imagePath\n tag: tagId\n identifier: artifactName\n type: DockerRegistry\n type: Kubernetes\n"
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}