O Auth Tokens - List

Returns a list of OAuthToken documents.

GET {endpoint}/oauth/tokens?api-version=2023-11-01-preview
GET {endpoint}/oauth/tokens?authProviderIds={authProviderIds}&partyIds={partyIds}&isValid={isValid}&minCreatedDateTime={minCreatedDateTime}&maxCreatedDateTime={maxCreatedDateTime}&minLastModifiedDateTime={minLastModifiedDateTime}&maxLastModifiedDateTime={maxLastModifiedDateTime}&maxPageSize={maxPageSize}&skipToken={skipToken}&api-version=2023-11-01-preview

URI Parameters

Name In Required Type Description
endpoint
path True

string

uri

The host name of the namespace, e.g. admaInstanceName.farmbeats.azure.net

api-version
query True

string

The requested API version

authProviderIds
query

string[]

Name of AuthProvider.

isValid
query

boolean

If the token object is valid.

maxCreatedDateTime
query

string

date-time

Maximum creation date of resource (inclusive).

maxLastModifiedDateTime
query

string

date-time

Maximum last modified date of resource (inclusive).

maxPageSize
query

integer

int32

Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50.

minCreatedDateTime
query

string

date-time

Minimum creation date of resource (inclusive).

minLastModifiedDateTime
query

string

date-time

Minimum last modified date of resource (inclusive).

partyIds
query

string[]

List of parties.

skipToken
query

string

Skip token for getting next set of results.

Request Header

Name Required Type Description
Authorization True

string

Please provide a valid bearer token for authorized API calls. Note that you might need to clear your browser cache if you tried un-authenticated calls before.

Responses

Name Type Description
200 OK

OAuthTokenListResponse

Success

Other Status Codes

ErrorResponse

Error

Headers

x-ms-error-code: string

Security

Authorization

Please provide a valid bearer token for authorized API calls. Note that you might need to clear your browser cache if you tried un-authenticated calls before.

Type: apiKey
In: header

Examples

OAuthTokens_List

Sample request

GET {endpoint}/oauth/tokens?api-version=2023-11-01-preview

Sample response

{
  "value": [
    {
      "partyId": "PARTY123",
      "authProviderId": "JOHNDEERE",
      "isValid": true,
      "eTag": "0f8fad5b-d9cb-469f-a165-70867728950e",
      "createdDateTime": "2021-04-22T18:49:25Z",
      "modifiedDateTime": "2021-04-22T18:49:25Z"
    }
  ],
  "skipToken": "string",
  "nextLink": "https://{{resourceName}}.farmbeats.azure.net/parties/{{partyId}}/seasonalFields/{{seasonalFieldId}}?api-version={{apiVersion}}&skipToken=%5b%7b%22token%22%3a%22%2bRID%3a%7e23TRC%3a10%23ISA%3d%22%2c%22range%22%3a%7b%22min%22%3a%22%22%2c%22max%22%3a%22FF%22%7d%7d%5d"
}

Definitions

Name Description
Error

An error from the Azure AgPlatform service.

ErrorResponse

An error response from the Azure AgPlatform service. See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses for ErrorResponse reference document.

InnerError

Inner error containing list of errors.See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object for InnerError reference document.

OAuthToken

Schema of OAuth token resource.

OAuthTokenListResponse

Paged response contains list of requested objects and a URL link to get the next set of results.

Error

An error from the Azure AgPlatform service.

Name Type Description
code

string

Server-defined set of error codes.

details

Error[]

Array of details about specific errors that led to this reported error.

innererror

InnerError

Inner error containing list of errors.See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object for InnerError reference document.

message

string

Human-readable representation of the error.

target

string

Target of the error.

ErrorResponse

An error response from the Azure AgPlatform service. See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses for ErrorResponse reference document.

Name Type Description
error

Error

An error from the Azure AgPlatform service.

traceId

string

Unique trace Id.

InnerError

Inner error containing list of errors.See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object for InnerError reference document.

Name Type Description
code

string

Specific error code than was provided by the containing error.

innererror

InnerError

Inner error containing list of errors.See https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object for InnerError reference document.

OAuthToken

Schema of OAuth token resource.

Name Type Default value Description
authProviderId

string

ID of the OAuth provider resource containing app information.

createdDateTime

string

Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.

eTag

string

The ETag value to implement optimistic concurrency.

isValid

boolean

True

An optional flag indicating whether the token is a valid or expired (Default value: true).

modifiedDateTime

string

Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.

partyId

string

Party ID for this OAuth config.

OAuthTokenListResponse

Paged response contains list of requested objects and a URL link to get the next set of results.

Name Type Description
nextLink

string

Continuation link (absolute URI) to the next page of results in the list.

skipToken

string

Token used in retrieving the next page. If null, there are no additional pages.

value

OAuthToken[]

List of requested objects.