share API (develop:84871a)

Download OpenAPI specification:

License: None

Automatically generated swagger spec for the share stack.

ShareService

List allowed account IDs by entity

Returns, for each given entity ID, the account IDs allowed to access that entity.

Request Body schema: application/json
required
entityIds
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "entityIds": [
    ]
}

Response samples

Content type
application/json
{
  • "result": [
    ]
}

List shares by source and target accounts

Returns shares from sourceAccountId to the given target account IDs. Optional resourceIdPrefix filters which resource IDs are returned.

path Parameters
sourceAccountId
required
string <int64>
targetAccountIds
required
Array of strings <int64> non-empty [ items <int64 > ]
query Parameters
resourceIdPrefix
string

If left empty all resourceIds should be returned

Responses

Response samples

Content type
application/json
{
  • "shares": [
    ]
}

List shares by resource IDs

Returns shares that include any of the given resource IDs.

Request Body schema: application/json
required
resourceIds
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "resourceIds": [
    ]
}

Response samples

Content type
application/json
{
  • "shares": [
    ]
}

List shares by sub-resource IDs

Returns shares associated with the given sub-resource IDs.

Request Body schema: application/json
required
subResourceIds
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "subResourceIds": [
    ]
}

Response samples

Content type
application/json
{
  • "shares": [
    ]
}

List shares by target account

Returns shares targeting the given account. Optional resourceIdPrefix filters which resource IDs are returned.

path Parameters
targetAccountId
required
string <int64>
query Parameters
resourceIdPrefix
string

Optional. If left empty all resourceIds should be returned

Responses

Response samples

Content type
application/json
{
  • "shares": [
    ]
}

List resource IDs by target account

Returns resource IDs shared with the given target account. Optional resourceIdPrefix and share scopes filter the results.

path Parameters
targetAccountId
required
string <int64>
query Parameters
resourceIdPrefix
string
scopes
Array of strings
Items Enum: "UNDEFINED_SCOPE" "MARKETING_SCOPE" "MANAGEMENT_SCOPE" "ACCOUNTING_SCOPE" "ASSET_SCOPE"

Optional. If empty array then filter is not applied

Responses

Response samples

Content type
application/json
{
  • "ids": [
    ]
}

List owner account IDs for a target

Returns source (owner) account IDs that share with the given target account.

path Parameters
targetAccountId
required
string <int64>

Responses

Response samples

Content type
application/json
{
  • "sourceAccountIds": [
    ]
}

List partner account IDs for a source

Returns target account IDs that are share partners of the given source account.

path Parameters
sourceAccountId
required
string <int64>

Responses

Response samples

Content type
application/json
{
  • "targetAccountIds": [
    ]
}

List partners of an asset account

Returns partner account IDs associated with the given asset account.

path Parameters
assetAccountId
required
string <int64>

Responses

Response samples

Content type
application/json
{
  • "partnerAccountIds": [
    ]
}

List sub-resource shares by resource IDs

Returns sub-resource shares for the given resource IDs, optionally filtered by sub-resource ID prefixes.

Request Body schema: application/json
required
resourceIds
required
Array of strings
subResourceIdPrefixes
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "resourceIds": [
    ],
  • "subResourceIdPrefixes": [
    ]
}

Response samples

Content type
application/json
{
  • "shares": [
    ]
}

List sub-resource IDs by target account

Returns sub-resource IDs shared with the given target account under the specified scope, optionally filtered by sub-resource ID prefix.

path Parameters
targetAccountId
required
string <int64>
query Parameters
scope
string
Default: "UNDEFINED_SCOPE"
Enum: "UNDEFINED_SCOPE" "MARKETING_SCOPE" "MANAGEMENT_SCOPE" "ACCOUNTING_SCOPE" "ASSET_SCOPE"
subResourceIdPrefix
string

Responses

Response samples

Content type
application/json
{
  • "subResourceIds": [
    ]
}

Set a share

Creates or updates a share from sourceAccountId to targetAccountId for the given resource IDs under the specified share scope. Returns the resulting share.

Request Body schema: application/json
required
resourceIds
required
Array of strings
scope
required
string (shareShareScope)
Default: "UNDEFINED_SCOPE"
Enum: "UNDEFINED_SCOPE" "MARKETING_SCOPE" "MANAGEMENT_SCOPE" "ACCOUNTING_SCOPE" "ASSET_SCOPE"
sourceAccountId
required
string <int64>
targetAccountId
required
string <int64>

Responses

Request samples

Content type
application/json
{
  • "resourceIds": [
    ],
  • "scope": "UNDEFINED_SCOPE",
  • "sourceAccountId": "string",
  • "targetAccountId": "string"
}

Response samples

Content type
application/json
{
  • "share": {
    }
}

Set shares for an owner

Sets shares from an owner account to a target account for the given share scopes. Returns the resulting shares.

Request Body schema: application/json
required
ownerAccountId
required
string <int64>
scopes
required
Array of strings (shareShareScope)
Items Enum: "UNDEFINED_SCOPE" "MARKETING_SCOPE" "MANAGEMENT_SCOPE" "ACCOUNTING_SCOPE" "ASSET_SCOPE"
targetAccountId
required
string <int64>

Responses

Request samples

Content type
application/json
{
  • "ownerAccountId": "string",
  • "scopes": [
    ],
  • "targetAccountId": "string"
}

Response samples

Content type
application/json
{
  • "shares": [
    ]
}

Unset shares

Removes shares for the given resource IDs from sourceAccountId under the specified share scopes.

Request Body schema: application/json
required
resourceIds
required
Array of strings
scopes
required
Array of strings (shareShareScope)
Items Enum: "UNDEFINED_SCOPE" "MARKETING_SCOPE" "MANAGEMENT_SCOPE" "ACCOUNTING_SCOPE" "ASSET_SCOPE"
sourceAccountId
required
string <int64>

Responses

Request samples

Content type
application/json
{
  • "resourceIds": [
    ],
  • "scopes": [
    ],
  • "sourceAccountId": "string"
}

Response samples

Content type
application/json
{ }