Services

This contains APIs related to Services

Upsert a Service by identifier

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity

header Parameters
If-Match
string
Request Body schema:

Details of the Service to be updated

identifier
string
orgIdentifier
string
projectIdentifier
string
name
string
description
string
object
version
integer <int64>
Responses
400

Bad Request

500

Internal Server Error

default

Returns the updated Service

put/ng/api/servicesV2/upsert
Request samples
{
  • "identifier": "string",
  • "orgIdentifier": "string",
  • "projectIdentifier": "string",
  • "name": "string",
  • "description": "string",
  • "tags": {
    },
  • "version": 0
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Create Services

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity

Request Body schema:

Details of the Services to be created

Array
identifier
string
orgIdentifier
string
projectIdentifier
string
name
string
description
string
object
version
integer <int64>
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 Service list

Request
Security:
ApiKey (readwrite)
query Parameters
page
integer <int32>
Default: 0

Indicates the number of pages. Results for these pages will be retrieved.

size
integer <int32>
Default: 100

The number of the elements to fetch

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

Responses
400

Bad Request

500

Internal Server Error

default

Returns the list of Services for a Project

get/ng/api/servicesV2
Request samples
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/servicesV2?page=0&size=100&accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&searchTerm=string&serviceIdentifiers=string&sort=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Update a Service by identifier

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity

header Parameters
If-Match
string
Request Body schema:

Details of the Service to be updated

identifier
string
orgIdentifier
string
projectIdentifier
string
name
string
description
string
object
version
integer <int64>
Responses
400

Bad Request

500

Internal Server Error

default

Returns the updated Service

put/ng/api/servicesV2
Request samples
{
  • "identifier": "string",
  • "orgIdentifier": "string",
  • "projectIdentifier": "string",
  • "name": "string",
  • "description": "string",
  • "tags": {
    },
  • "version": 0
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Create a Service

Request
Security:
ApiKey (readwrite)
query Parameters
accountIdentifier
required
string

Account Identifier for the Entity

Request Body schema:

Details of the Service to be created

identifier
string
orgIdentifier
string
projectIdentifier
string
name
string
description
string
object
version
integer <int64>
Responses
400

Bad Request

500

Internal Server Error

default

Returns the created Service

post/ng/api/servicesV2
Request samples
{
  • "identifier": "string",
  • "orgIdentifier": "string",
  • "projectIdentifier": "string",
  • "name": "string",
  • "description": "string",
  • "tags": {
    },
  • "version": 0
}
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Gets Service Access list

Request
Security:
ApiKey (readwrite)
query Parameters
page
integer <int32>
Default: 0

Indicates the number of pages. Results for these pages will be retrieved.

size
integer <int32>
Default: 100

The number of the elements to fetch

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

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
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/servicesV2/list/access?page=0&size=100&accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&searchTerm=string&serviceIdentifiers=string&sort=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Gets a Service by identifier

Request
Security:
ApiKey (readwrite)
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
curl -i -X GET \
  'https://app.harness.io/gateway/ng/api/servicesV2/:serviceIdentifier?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string&deleted=false' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}

Delete a Service by identifier

Request
Security:
ApiKey (readwrite)
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

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
curl -i -X DELETE \
  'https://app.harness.io/gateway/ng/api/servicesV2/:serviceIdentifier?accountIdentifier=string&orgIdentifier=string&projectIdentifier=string' \
  -H 'If-Match: string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
{
  • "status": "SUCCESS",
  • "code": "DEFAULT_ERROR_CODE",
  • "message": "string",
  • "correlationId": "string",
  • "errors": [
    ]
}