List targets

Prev Next
Get
/v2/targets

Returns the targets in a workspace, so that you can find the ID of the target whose values you want to upload. Each target's type and hierarchyType set the columns its CSV file needs. See POST /v2/targets/{targetId}/assignments.

If the workspace has no targets, the response holds an empty targets list.

Required authorization scope: 'api:targets:read'.

Query parameters
workspaceId
integer (int64) Required

The ID of the workspace the targets belong to. Use the Workspaces API to look up workspace IDs.

Responses
200

Successful response

Expand All
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
targets
Array of object (TargetDefinitionDto)

The targets in the workspace.

object

A target in the workspace.

id
string

The Gong ID of the target. Up to 20 digits. To upload the target's values, send this ID in the path of POST /v2/targets/{targetId}/assignments.

Example7782342274025111111
name
string

The name of the target.

ExampleARR
description
string

The description of the target.

ExampleAnnual Recurring Revenue
type
string

The kind of value the target holds. Possible values: CURRENCY (an amount of money, such as a revenue quota), UNIT (a count, such as a number of deals).

ExampleCURRENCY
unit
string

For a UNIT target, the name of what the target counts, such as Deals, as the admin entered it in Gong.

ExampleUSD
hierarchyType
string

The kind of owner each of the target's values is for. Possible values: TEAM (a user, or a manager's team), TERRITORY (a territory imported from Salesforce). The value sets the identifier column of the target's CSV file.

ExampleTEAM
createdDateTime
string | null

The date and time the target was created, in ISO-8601 format.

Example2024-01-15T10:30:00Z
400
  • The request doesn't include a workspace ID.
  • A parameter has the wrong type or format. The error message names the parameter.
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
401
  • The API key or access token is missing or isn't valid.
  • The integration uses OAuth, and its token doesn't have the scope this endpoint requires. The error message names the scope.
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
403

Access denied

object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
429
  • The company sent more requests than its rate limit allows. Wait the number of seconds in Retry-After, then send the request again.
Headers
Retry-After
integer (int32)
The number of seconds to wait before you send the request again.
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string
500
  • Gong couldn't complete the request because of an unexpected error. Try again. If the error continues, contact Gong Support and give them the requestId from the response.
object
requestId
string

The Gong ID of this request. Provide it to Gong Support to troubleshoot a problem with the request.

Example4al018gzaztcr8nbukw
errors
Array of string

Error messages.

Example[ "An error has occurred" ]
string