Skip to content

OAuth providers

OAuth Providers Service API enables management of external OAuth providers allowing DataRobot users to connect their workflows with external provider resources.

DELETE /api/v2/externalOAuth/authorizedProviders/{authorizedProviderID}/

Revoke an OAuth Provider Authorization by ID.

Parameters

Name In Type Required Description
authorizationID path string true OAuth Provider Authorization ID

Example responses

404 Response

{
  "properties": {
    "message": {
      "type": "string"
    },
    "status": {
      "type": "integer"
    }
  },
  "type": "object"
}

Responses

Status Meaning Description Schema
204 No Content No Content None
404 Not Found OAuth Provider Authorization not found httperror.Error
422 Unprocessable Entity Validation error httpres.ReqValidationError

This operation does not require authentication

POST /api/v2/externalOAuth/authorizedProviders/{authorizedProviderID}/accessToken/

Acquire an access token for the OAuth Provider Authorization.

Parameters

Name In Type Required Description
authorizationID path string true OAuth Provider Authorization ID

Example responses

201 Response

{
  "properties": {
    "accessToken": {
      "type": "string"
    },
    "authorizedOauthProvider": {
      "properties": {
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "credentialId": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "oauthClientId": {
          "type": "string"
        },
        "orgId": {
          "type": "string"
        },
        "provider": {
          "properties": {
            "clientId": {
              "type": "string"
            },
            "createdAt": {
              "format": "date-time",
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "metadata": {
              "properties": {
                "host": {
                  "type": "string"
                },
                "settingsUrl": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "name": {
              "type": "string"
            },
            "orgId": {
              "type": "string"
            },
            "secureConfigId": {
              "type": "string"
            },
            "status": {
              "enum": [
                "active",
                "inactive",
                "disabled",
                "deleted"
              ],
              "type": "string",
              "x-enum-varnames": [
                "DefaultStatus",
                "StatusActive",
                "StatusInvalid",
                "StatusDeleting",
                "StatusDeletionFailed"
              ]
            },
            "type": {
              "enum": [
                "github",
                "gitlab",
                "bitbucket",
                "google",
                "box"
              ],
              "type": "string",
              "x-enum-varnames": [
                "TypeGithub",
                "TypeGitlab",
                "TypeBitbucket",
                "TypeGoogle",
                "TypeBox",
                "TypeTest"
              ]
            },
            "updatedAt": {
              "format": "date-time",
              "type": "string"
            }
          },
          "type": "object"
        },
        "refreshTokenExpiresAt": {
          "format": "date-time",
          "type": "string"
        },
        "status": {
          "enum": [
            "active",
            "expired",
            "invalidOAuthClient",
            "invalidProviderState"
          ],
          "type": "string",
          "x-enum-varnames": [
            "AuthzStatusActive",
            "AuthzStatusExpired",
            "AuthzStatusInvalidOAuthClient",
            "AuthzInactiveProviderState"
          ]
        },
        "userId": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "expiresAt": {
      "type": "string"
    }
  },
  "type": "object"
}

Responses

Status Meaning Description Schema
201 Created Created handler.GetAccessTokenResponse
403 Forbidden Forbidden operation for the given OAuth Provider httperror.Error
404 Not Found OAuth Provider Authorization not found httperror.Error
422 Unprocessable Entity Validation error httpres.ReqValidationError

This operation does not require authentication

GET /api/v2/externalOAuth/authorizedProviders/{authorizedProviderID}/userinfo/

Retrieve user information from the OAuth Provider using the previously obtained authorization.

Parameters

Name In Type Required Description
authorizationID path string true OAuth Provider Authorization ID

Example responses

200 Response

{
  "properties": {
    "description": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "familyName": {
      "type": "string"
    },
    "givenName": {
      "type": "string"
    },
    "locale": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "nickName": {
      "type": "string"
    },
    "picture": {
      "type": "string"
    },
    "raw": {
      "additionalProperties": {},
      "type": "object"
    },
    "sub": {
      "type": "string"
    }
  },
  "type": "object"
}

Responses

Status Meaning Description Schema
200 OK User information oauth.User
403 Forbidden Forbidden operation for the given OAuth Provider httperror.Error
404 Not Found OAuth Provider Authorization not found httperror.Error
410 Gone Authorization expired httperror.Error
422 Unprocessable Entity Validation error httpres.ReqValidationError

This operation does not require authentication

GET /api/v2/externalOAuth/jobs/{jobID}/

Retrieve the status of an OAuth Provider Job by ID.

Parameters

Name In Type Required Description
jobID path string true Job ID

Example responses

200 Response

{
  "properties": {
    "details": {
      "description": "Details is a slice of key-value pairs containing additional information about the job.\nFor example, for a delete provider job, it may include the provider ID and connected authorization IDs.\nExample usage:\nDetails = []struct {\n    Name:  \"provider_id\",\n    Value: \"1234\",\n},\n{\n    Name:  \"authorization_ids\",\n    Value: []string{\"1234\", \"5678\"},\n}",
      "items": {
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {}
        },
        "type": "object"
      },
      "type": "array",
      "uniqueItems": false
    },
    "finishedAt": {
      "format": "date-time",
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "orgId": {
      "type": "string"
    },
    "startedAt": {
      "format": "date-time",
      "type": "string"
    },
    "status": {
      "enum": [
        "PENDING",
        "RUNNING",
        "COMPLETED",
        "ERROR"
      ],
      "type": "string",
      "x-enum-varnames": [
        "JobStatusPending",
        "JobStatusRunning",
        "JobStatusCompleted",
        "JobStatusError"
      ]
    },
    "type": {
      "enum": [
        "DELETE_PROVIDER",
        "STATS"
      ],
      "type": "string",
      "x-enum-varnames": [
        "JobTypeDeleteProvider",
        "JobTypeStats"
      ]
    }
  },
  "type": "object"
}

Responses

Status Meaning Description Schema
200 OK OK handler.jobStatusResponse
404 Not Found Job not found httperror.Error
422 Unprocessable Entity Validation error httpres.ReqValidationError

This operation does not require authentication

GET /api/v2/externalOAuth/providers/

Returns a list of all available OAuth providers.

Parameters

Name In Type Required Description
orderBy query string false none
ids query array[string] false none
types query array[string] false none
host query array[string] false none

Enumerated Values

Parameter Value
orderBy [createdAt, -createdAt]
types [github, gitlab, bitbucket, google, box]

Example responses

200 Response

{
  "properties": {
    "data": {
      "items": {
        "properties": {
          "clientId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "metadata": {
            "properties": {
              "host": {
                "type": "string"
              },
              "settingsUrl": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "secureConfigId": {
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "inactive",
              "disabled",
              "deleted"
            ],
            "type": "string",
            "x-enum-varnames": [
              "DefaultStatus",
              "StatusActive",
              "StatusInvalid",
              "StatusDeleting",
              "StatusDeletionFailed"
            ]
          },
          "type": {
            "enum": [
              "github",
              "gitlab",
              "bitbucket",
              "google",
              "box"
            ],
            "type": "string",
            "x-enum-varnames": [
              "TypeGithub",
              "TypeGitlab",
              "TypeBitbucket",
              "TypeGoogle",
              "TypeBox",
              "TypeTest"
            ]
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array",
      "uniqueItems": false
    }
  },
  "type": "object"
}

Responses

Status Meaning Description Schema
200 OK OK handler.ListOAuthProvidersResponse
422 Unprocessable Entity Validation error httpres.ReqValidationError

This operation does not require authentication

POST /api/v2/externalOAuth/providers/

Creates a new OAuth provider.

Body parameter

{
  "properties": {
    "clientId": {
      "type": "string"
    },
    "clientSecret": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "type": {
      "enum": [
        "github",
        "gitlab",
        "bitbucket",
        "google",
        "box"
      ],
      "type": "string",
      "x-enum-varnames": [
        "TypeGithub",
        "TypeGitlab",
        "TypeBitbucket",
        "TypeGoogle",
        "TypeBox",
        "TypeTest"
      ]
    }
  },
  "required": [
    "clientId",
    "clientSecret",
    "name",
    "type"
  ],
  "type": "object"
}

Parameters

Name In Type Required Description
body body provider.CreateProviderRequest true Create provider request body

Example responses

201 Response

{
  "properties": {
    "clientId": {
      "type": "string"
    },
    "createdAt": {
      "format": "date-time",
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "metadata": {
      "properties": {
        "host": {
          "type": "string"
        },
        "settingsUrl": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": {
      "type": "string"
    },
    "orgId": {
      "type": "string"
    },
    "secureConfigId": {
      "type": "string"
    },
    "status": {
      "enum": [
        "active",
        "inactive",
        "disabled",
        "deleted"
      ],
      "type": "string",
      "x-enum-varnames": [
        "DefaultStatus",
        "StatusActive",
        "StatusInvalid",
        "StatusDeleting",
        "StatusDeletionFailed"
      ]
    },
    "type": {
      "enum": [
        "github",
        "gitlab",
        "bitbucket",
        "google",
        "box"
      ],
      "type": "string",
      "x-enum-varnames": [
        "TypeGithub",
        "TypeGitlab",
        "TypeBitbucket",
        "TypeGoogle",
        "TypeBox",
        "TypeTest"
      ]
    },
    "updatedAt": {
      "format": "date-time",
      "type": "string"
    }
  },
  "type": "object"
}

Responses

Status Meaning Description Schema
201 Created Created models.OAuthProvider
422 Unprocessable Entity Validation error httpres.ReqValidationError

This operation does not require authentication

POST /api/v2/externalOAuth/providers/callback/

Handles the OAuth2 callback, exchanges authorization code for an access/refresh tokens, and creates a new

Body parameter

{
  "properties": {
    "code": {
      "type": "string"
    },
    "providerId": {
      "type": "string"
    },
    "state": {
      "type": "string"
    }
  },
  "required": [
    "code",
    "providerId",
    "state"
  ],
  "type": "object"
}

Parameters

Name In Type Required Description
body body handler.OAuthCallbackRequest true OAuth callback request body

Example responses

200 Response

{
  "properties": {
    "authorizedProvider": {
      "properties": {
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "credentialId": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "oauthClientId": {
          "type": "string"
        },
        "orgId": {
          "type": "string"
        },
        "provider": {
          "properties": {
            "clientId": {
              "type": "string"
            },
            "createdAt": {
              "format": "date-time",
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "metadata": {
              "properties": {
                "host": {
                  "type": "string"
                },
                "settingsUrl": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "name": {
              "type": "string"
            },
            "orgId": {
              "type": "string"
            },
            "secureConfigId": {
              "type": "string"
            },
            "status": {
              "enum": [
                "active",
                "inactive",
                "disabled",
                "deleted"
              ],
              "type": "string",
              "x-enum-varnames": [
                "DefaultStatus",
                "StatusActive",
                "StatusInvalid",
                "StatusDeleting",
                "StatusDeletionFailed"
              ]
            },
            "type": {
              "enum": [
                "github",
                "gitlab",
                "bitbucket",
                "google",
                "box"
              ],
              "type": "string",
              "x-enum-varnames": [
                "TypeGithub",
                "TypeGitlab",
                "TypeBitbucket",
                "TypeGoogle",
                "TypeBox",
                "TypeTest"
              ]
            },
            "updatedAt": {
              "format": "date-time",
              "type": "string"
            }
          },
          "type": "object"
        },
        "refreshTokenExpiresAt": {
          "format": "date-time",
          "type": "string"
        },
        "status": {
          "enum": [
            "active",
            "expired",
            "invalidOAuthClient",
            "invalidProviderState"
          ],
          "type": "string",
          "x-enum-varnames": [
            "AuthzStatusActive",
            "AuthzStatusExpired",
            "AuthzStatusInvalidOAuthClient",
            "AuthzInactiveProviderState"
          ]
        },
        "userId": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "userInfo": {
      "properties": {
        "description": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "familyName": {
          "type": "string"
        },
        "givenName": {
          "type": "string"
        },
        "locale": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "nickName": {
          "type": "string"
        },
        "picture": {
          "type": "string"
        },
        "raw": {
          "additionalProperties": {},
          "type": "object"
        },
        "sub": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}

Responses

Status Meaning Description Schema
200 OK OK handler.CallbackResponse
400 Bad Request Invalid authorization data was provided httperror.Error
404 Not Found Provider not found httperror.Error
422 Unprocessable Entity Validation error httpres.ReqValidationError

This operation does not require authentication

DELETE /api/v2/externalOAuth/providers/{providerID}/

Initiates a job to delete an OAuth provider by its ID, along with all associated resources.

Parameters

Name In Type Required Description
providerID path string true OAuth Provider ID

Example responses

202 Response

{
  "properties": {
    "location": {
      "type": "string"
    }
  },
  "type": "object"
}

Responses

Status Meaning Description Schema
202 Accepted Location of the job that will perform deletion handler.DeleteOAuthProviderResponse
422 Unprocessable Entity Validation error httpres.ReqValidationError

This operation does not require authentication

GET /api/v2/externalOAuth/providers/{providerID}/

Retrieves an OAuth provider by its ID.

Parameters

Name In Type Required Description
providerID path string true OAuth Provider ID

Example responses

200 Response

{
  "properties": {
    "clientId": {
      "type": "string"
    },
    "createdAt": {
      "format": "date-time",
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "metadata": {
      "properties": {
        "host": {
          "type": "string"
        },
        "settingsUrl": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": {
      "type": "string"
    },
    "orgId": {
      "type": "string"
    },
    "secureConfigId": {
      "type": "string"
    },
    "status": {
      "enum": [
        "active",
        "inactive",
        "disabled",
        "deleted"
      ],
      "type": "string",
      "x-enum-varnames": [
        "DefaultStatus",
        "StatusActive",
        "StatusInvalid",
        "StatusDeleting",
        "StatusDeletionFailed"
      ]
    },
    "type": {
      "enum": [
        "github",
        "gitlab",
        "bitbucket",
        "google",
        "box"
      ],
      "type": "string",
      "x-enum-varnames": [
        "TypeGithub",
        "TypeGitlab",
        "TypeBitbucket",
        "TypeGoogle",
        "TypeBox",
        "TypeTest"
      ]
    },
    "updatedAt": {
      "format": "date-time",
      "type": "string"
    }
  },
  "type": "object"
}

Responses

Status Meaning Description Schema
200 OK OK models.OAuthProvider
404 Not Found Provider not found httperror.Error
422 Unprocessable Entity Validation error httpres.ReqValidationError

This operation does not require authentication

PATCH /api/v2/externalOAuth/providers/{providerID}/

Updates an existing OAuth provider by its ID.

Body parameter

{
  "properties": {
    "clientSecret": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "status": {
      "enum": [
        "active",
        "inactive",
        "disabled",
        "deleted"
      ],
      "type": "string",
      "x-enum-varnames": [
        "DefaultStatus",
        "StatusActive",
        "StatusInvalid",
        "StatusDeleting",
        "StatusDeletionFailed"
      ]
    }
  },
  "type": "object"
}

Parameters

Name In Type Required Description
providerID path string true OAuth Provider ID
body body provider.UpdateProviderRequest true Update provider request body

Example responses

200 Response

{
  "properties": {
    "clientId": {
      "type": "string"
    },
    "createdAt": {
      "format": "date-time",
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "metadata": {
      "properties": {
        "host": {
          "type": "string"
        },
        "settingsUrl": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": {
      "type": "string"
    },
    "orgId": {
      "type": "string"
    },
    "secureConfigId": {
      "type": "string"
    },
    "status": {
      "enum": [
        "active",
        "inactive",
        "disabled",
        "deleted"
      ],
      "type": "string",
      "x-enum-varnames": [
        "DefaultStatus",
        "StatusActive",
        "StatusInvalid",
        "StatusDeleting",
        "StatusDeletionFailed"
      ]
    },
    "type": {
      "enum": [
        "github",
        "gitlab",
        "bitbucket",
        "google",
        "box"
      ],
      "type": "string",
      "x-enum-varnames": [
        "TypeGithub",
        "TypeGitlab",
        "TypeBitbucket",
        "TypeGoogle",
        "TypeBox",
        "TypeTest"
      ]
    },
    "updatedAt": {
      "format": "date-time",
      "type": "string"
    }
  },
  "type": "object"
}

Responses

Status Meaning Description Schema
200 OK OK models.OAuthProvider
422 Unprocessable Entity Validation error httpres.ReqValidationError

This operation does not require authentication

POST /api/v2/externalOAuth/providers/{providerID}/authorize/

Returns a redirect URL to the OAuth2 provider's authorization page to get user's consent for accessing their data.

Parameters

Name In Type Required Description
providerID path string true OAuth Provider ID
state query string false none
redirect_uri query string false none

Example responses

200 Response

{
  "properties": {
    "redirectUrl": {
      "type": "string"
    },
    "state": {
      "type": "string"
    }
  },
  "type": "object"
}

Responses

Status Meaning Description Schema
200 OK OK handler.AuthorizeProviderResponse
404 Not Found Provider not found httperror.Error
409 Conflict Provider is in a conflicting state httperror.Error
422 Unprocessable Entity Validation error httpres.ReqValidationError

This operation does not require authentication

Schemas

handler.AuthorizeProviderResponse

{
  "properties": {
    "redirectUrl": {
      "type": "string"
    },
    "state": {
      "type": "string"
    }
  },
  "type": "object"
}

Properties

Name Type Required Restrictions Description
redirectUrl string false none
state string false none

handler.CallbackResponse

{
  "properties": {
    "authorizedProvider": {
      "properties": {
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "credentialId": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "oauthClientId": {
          "type": "string"
        },
        "orgId": {
          "type": "string"
        },
        "provider": {
          "properties": {
            "clientId": {
              "type": "string"
            },
            "createdAt": {
              "format": "date-time",
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "metadata": {
              "properties": {
                "host": {
                  "type": "string"
                },
                "settingsUrl": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "name": {
              "type": "string"
            },
            "orgId": {
              "type": "string"
            },
            "secureConfigId": {
              "type": "string"
            },
            "status": {
              "enum": [
                "active",
                "inactive",
                "disabled",
                "deleted"
              ],
              "type": "string",
              "x-enum-varnames": [
                "DefaultStatus",
                "StatusActive",
                "StatusInvalid",
                "StatusDeleting",
                "StatusDeletionFailed"
              ]
            },
            "type": {
              "enum": [
                "github",
                "gitlab",
                "bitbucket",
                "google",
                "box"
              ],
              "type": "string",
              "x-enum-varnames": [
                "TypeGithub",
                "TypeGitlab",
                "TypeBitbucket",
                "TypeGoogle",
                "TypeBox",
                "TypeTest"
              ]
            },
            "updatedAt": {
              "format": "date-time",
              "type": "string"
            }
          },
          "type": "object"
        },
        "refreshTokenExpiresAt": {
          "format": "date-time",
          "type": "string"
        },
        "status": {
          "enum": [
            "active",
            "expired",
            "invalidOAuthClient",
            "invalidProviderState"
          ],
          "type": "string",
          "x-enum-varnames": [
            "AuthzStatusActive",
            "AuthzStatusExpired",
            "AuthzStatusInvalidOAuthClient",
            "AuthzInactiveProviderState"
          ]
        },
        "userId": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "userInfo": {
      "properties": {
        "description": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "familyName": {
          "type": "string"
        },
        "givenName": {
          "type": "string"
        },
        "locale": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "nickName": {
          "type": "string"
        },
        "picture": {
          "type": "string"
        },
        "raw": {
          "additionalProperties": {},
          "type": "object"
        },
        "sub": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}

Properties

Name Type Required Restrictions Description
authorizedProvider models.AuthorizedProvider false none
userInfo oauth.User false none

handler.DeleteOAuthProviderResponse

{
  "properties": {
    "location": {
      "type": "string"
    }
  },
  "type": "object"
}

Properties

Name Type Required Restrictions Description
location string false none

handler.GetAccessTokenResponse

{
  "properties": {
    "accessToken": {
      "type": "string"
    },
    "authorizedOauthProvider": {
      "properties": {
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "credentialId": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "oauthClientId": {
          "type": "string"
        },
        "orgId": {
          "type": "string"
        },
        "provider": {
          "properties": {
            "clientId": {
              "type": "string"
            },
            "createdAt": {
              "format": "date-time",
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "metadata": {
              "properties": {
                "host": {
                  "type": "string"
                },
                "settingsUrl": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "name": {
              "type": "string"
            },
            "orgId": {
              "type": "string"
            },
            "secureConfigId": {
              "type": "string"
            },
            "status": {
              "enum": [
                "active",
                "inactive",
                "disabled",
                "deleted"
              ],
              "type": "string",
              "x-enum-varnames": [
                "DefaultStatus",
                "StatusActive",
                "StatusInvalid",
                "StatusDeleting",
                "StatusDeletionFailed"
              ]
            },
            "type": {
              "enum": [
                "github",
                "gitlab",
                "bitbucket",
                "google",
                "box"
              ],
              "type": "string",
              "x-enum-varnames": [
                "TypeGithub",
                "TypeGitlab",
                "TypeBitbucket",
                "TypeGoogle",
                "TypeBox",
                "TypeTest"
              ]
            },
            "updatedAt": {
              "format": "date-time",
              "type": "string"
            }
          },
          "type": "object"
        },
        "refreshTokenExpiresAt": {
          "format": "date-time",
          "type": "string"
        },
        "status": {
          "enum": [
            "active",
            "expired",
            "invalidOAuthClient",
            "invalidProviderState"
          ],
          "type": "string",
          "x-enum-varnames": [
            "AuthzStatusActive",
            "AuthzStatusExpired",
            "AuthzStatusInvalidOAuthClient",
            "AuthzInactiveProviderState"
          ]
        },
        "userId": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "expiresAt": {
      "type": "string"
    }
  },
  "type": "object"
}

Properties

Name Type Required Restrictions Description
accessToken string false none
authorizedOauthProvider models.AuthorizedProvider false none
expiresAt string false none

handler.ListOAuthProvidersResponse

{
  "properties": {
    "data": {
      "items": {
        "properties": {
          "clientId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "metadata": {
            "properties": {
              "host": {
                "type": "string"
              },
              "settingsUrl": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "secureConfigId": {
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "inactive",
              "disabled",
              "deleted"
            ],
            "type": "string",
            "x-enum-varnames": [
              "DefaultStatus",
              "StatusActive",
              "StatusInvalid",
              "StatusDeleting",
              "StatusDeletionFailed"
            ]
          },
          "type": {
            "enum": [
              "github",
              "gitlab",
              "bitbucket",
              "google",
              "box"
            ],
            "type": "string",
            "x-enum-varnames": [
              "TypeGithub",
              "TypeGitlab",
              "TypeBitbucket",
              "TypeGoogle",
              "TypeBox",
              "TypeTest"
            ]
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array",
      "uniqueItems": false
    }
  },
  "type": "object"
}

Properties

Name Type Required Restrictions Description
data [models.OAuthProvider] false none

handler.OAuthCallbackRequest

{
  "properties": {
    "code": {
      "type": "string"
    },
    "providerId": {
      "type": "string"
    },
    "state": {
      "type": "string"
    }
  },
  "required": [
    "code",
    "providerId",
    "state"
  ],
  "type": "object"
}

Properties

Name Type Required Restrictions Description
code string true none
providerId string true none
state string true none

handler.jobStatusResponse

{
  "properties": {
    "details": {
      "description": "Details is a slice of key-value pairs containing additional information about the job.\nFor example, for a delete provider job, it may include the provider ID and connected authorization IDs.\nExample usage:\nDetails = []struct {\n    Name:  \"provider_id\",\n    Value: \"1234\",\n},\n{\n    Name:  \"authorization_ids\",\n    Value: []string{\"1234\", \"5678\"},\n}",
      "items": {
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {}
        },
        "type": "object"
      },
      "type": "array",
      "uniqueItems": false
    },
    "finishedAt": {
      "format": "date-time",
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "orgId": {
      "type": "string"
    },
    "startedAt": {
      "format": "date-time",
      "type": "string"
    },
    "status": {
      "enum": [
        "PENDING",
        "RUNNING",
        "COMPLETED",
        "ERROR"
      ],
      "type": "string",
      "x-enum-varnames": [
        "JobStatusPending",
        "JobStatusRunning",
        "JobStatusCompleted",
        "JobStatusError"
      ]
    },
    "type": {
      "enum": [
        "DELETE_PROVIDER",
        "STATS"
      ],
      "type": "string",
      "x-enum-varnames": [
        "JobTypeDeleteProvider",
        "JobTypeStats"
      ]
    }
  },
  "type": "object"
}

Properties

Name Type Required Restrictions Description
details [handler.keyValue] false Details is a slice of key-value pairs containing additional information about the job.
For example, for a delete provider job, it may include the provider ID and connected authorization IDs.
Example usage:
Details = []struct {
Name: "provider_id",
Value: "1234",
},
{
Name: "authorization_ids",
Value: []string{"1234", "5678"},
}
finishedAt string(date-time) false none
id string false none
name string false none
orgId string false none
startedAt string(date-time) false none
status models.JobStatus false none
type models.JobType false none

handler.keyValue

{
  "properties": {
    "name": {
      "type": "string"
    },
    "value": {}
  },
  "type": "object"
}

Properties

Name Type Required Restrictions Description
name string false none
value any false none

httperror.Error

{
  "properties": {
    "message": {
      "type": "string"
    },
    "status": {
      "type": "integer"
    }
  },
  "type": "object"
}

Properties

Name Type Required Restrictions Description
message string false none
status integer false none

httpres.ReqValidationError

{
  "properties": {
    "errors": {},
    "location": {
      "enum": [
        "request body",
        "path params",
        "query params"
      ],
      "type": "string",
      "x-enum-varnames": [
        "RequestBody",
        "PathParams",
        "QueryParams"
      ]
    }
  },
  "type": "object"
}

Properties

Name Type Required Restrictions Description
errors any false none
location httpres.ValidationErrorLocation false none

httpres.ValidationErrorLocation

{
  "enum": [
    "request body",
    "path params",
    "query params"
  ],
  "type": "string",
  "x-enum-varnames": [
    "RequestBody",
    "PathParams",
    "QueryParams"
  ]
}

Properties

Name Type Required Restrictions Description
anonymous string false none

Enumerated Values

Property Value
anonymous [request body, path params, query params]

models.AuthorizedProvider

{
  "properties": {
    "createdAt": {
      "format": "date-time",
      "type": "string"
    },
    "credentialId": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "oauthClientId": {
      "type": "string"
    },
    "orgId": {
      "type": "string"
    },
    "provider": {
      "properties": {
        "clientId": {
          "type": "string"
        },
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "metadata": {
          "properties": {
            "host": {
              "type": "string"
            },
            "settingsUrl": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "name": {
          "type": "string"
        },
        "orgId": {
          "type": "string"
        },
        "secureConfigId": {
          "type": "string"
        },
        "status": {
          "enum": [
            "active",
            "inactive",
            "disabled",
            "deleted"
          ],
          "type": "string",
          "x-enum-varnames": [
            "DefaultStatus",
            "StatusActive",
            "StatusInvalid",
            "StatusDeleting",
            "StatusDeletionFailed"
          ]
        },
        "type": {
          "enum": [
            "github",
            "gitlab",
            "bitbucket",
            "google",
            "box"
          ],
          "type": "string",
          "x-enum-varnames": [
            "TypeGithub",
            "TypeGitlab",
            "TypeBitbucket",
            "TypeGoogle",
            "TypeBox",
            "TypeTest"
          ]
        },
        "updatedAt": {
          "format": "date-time",
          "type": "string"
        }
      },
      "type": "object"
    },
    "refreshTokenExpiresAt": {
      "format": "date-time",
      "type": "string"
    },
    "status": {
      "enum": [
        "active",
        "expired",
        "invalidOAuthClient",
        "invalidProviderState"
      ],
      "type": "string",
      "x-enum-varnames": [
        "AuthzStatusActive",
        "AuthzStatusExpired",
        "AuthzStatusInvalidOAuthClient",
        "AuthzInactiveProviderState"
      ]
    },
    "userId": {
      "type": "string"
    }
  },
  "type": "object"
}

Properties

Name Type Required Restrictions Description
createdAt string(date-time) false none
credentialId string false none
id string false none
oauthClientId string false none
orgId string false none
provider models.OAuthProvider false none
refreshTokenExpiresAt string(date-time) false none
status models.AuthzStatus false none
userId string false none

models.AuthzStatus

{
  "enum": [
    "active",
    "expired",
    "invalidOAuthClient",
    "invalidProviderState"
  ],
  "type": "string",
  "x-enum-varnames": [
    "AuthzStatusActive",
    "AuthzStatusExpired",
    "AuthzStatusInvalidOAuthClient",
    "AuthzInactiveProviderState"
  ]
}

Properties

Name Type Required Restrictions Description
anonymous string false none

Enumerated Values

Property Value
anonymous [active, expired, invalidOAuthClient, invalidProviderState]

models.JobStatus

{
  "enum": [
    "PENDING",
    "RUNNING",
    "COMPLETED",
    "ERROR"
  ],
  "type": "string",
  "x-enum-varnames": [
    "JobStatusPending",
    "JobStatusRunning",
    "JobStatusCompleted",
    "JobStatusError"
  ]
}

Properties

Name Type Required Restrictions Description
anonymous string false none

Enumerated Values

Property Value
anonymous [PENDING, RUNNING, COMPLETED, ERROR]

models.JobType

{
  "enum": [
    "DELETE_PROVIDER",
    "STATS"
  ],
  "type": "string",
  "x-enum-varnames": [
    "JobTypeDeleteProvider",
    "JobTypeStats"
  ]
}

Properties

Name Type Required Restrictions Description
anonymous string false none

Enumerated Values

Property Value
anonymous [DELETE_PROVIDER, STATS]

models.OAuthProvider

{
  "properties": {
    "clientId": {
      "type": "string"
    },
    "createdAt": {
      "format": "date-time",
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "metadata": {
      "properties": {
        "host": {
          "type": "string"
        },
        "settingsUrl": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": {
      "type": "string"
    },
    "orgId": {
      "type": "string"
    },
    "secureConfigId": {
      "type": "string"
    },
    "status": {
      "enum": [
        "active",
        "inactive",
        "disabled",
        "deleted"
      ],
      "type": "string",
      "x-enum-varnames": [
        "DefaultStatus",
        "StatusActive",
        "StatusInvalid",
        "StatusDeleting",
        "StatusDeletionFailed"
      ]
    },
    "type": {
      "enum": [
        "github",
        "gitlab",
        "bitbucket",
        "google",
        "box"
      ],
      "type": "string",
      "x-enum-varnames": [
        "TypeGithub",
        "TypeGitlab",
        "TypeBitbucket",
        "TypeGoogle",
        "TypeBox",
        "TypeTest"
      ]
    },
    "updatedAt": {
      "format": "date-time",
      "type": "string"
    }
  },
  "type": "object"
}

Properties

Name Type Required Restrictions Description
clientId string false none
createdAt string(date-time) false none
id string false none
metadata models.ProviderMetadata false none
name string false none
orgId string false none
secureConfigId string false none
status oauthprovider.Status false none
type oauthprovider.Type false none
updatedAt string(date-time) false none

models.ProviderMetadata

{
  "properties": {
    "host": {
      "type": "string"
    },
    "settingsUrl": {
      "type": "string"
    }
  },
  "type": "object"
}

Properties

Name Type Required Restrictions Description
host string false none
settingsUrl string false none

oauth.User

{
  "properties": {
    "description": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "familyName": {
      "type": "string"
    },
    "givenName": {
      "type": "string"
    },
    "locale": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "nickName": {
      "type": "string"
    },
    "picture": {
      "type": "string"
    },
    "raw": {
      "additionalProperties": {},
      "type": "object"
    },
    "sub": {
      "type": "string"
    }
  },
  "type": "object"
}

Properties

Name Type Required Restrictions Description
description string false none
email string false none
familyName string false none
givenName string false none
locale string false none
name string false none
nickName string false none
picture string false none
raw object false none
» additionalProperties any false none
sub string false none

oauthprovider.Status

{
  "enum": [
    "active",
    "inactive",
    "disabled",
    "deleted"
  ],
  "type": "string",
  "x-enum-varnames": [
    "DefaultStatus",
    "StatusActive",
    "StatusInvalid",
    "StatusDeleting",
    "StatusDeletionFailed"
  ]
}

Properties

Name Type Required Restrictions Description
anonymous string false none

Enumerated Values

Property Value
anonymous [active, inactive, disabled, deleted]

oauthprovider.Type

{
  "enum": [
    "github",
    "gitlab",
    "bitbucket",
    "google",
    "box"
  ],
  "type": "string",
  "x-enum-varnames": [
    "TypeGithub",
    "TypeGitlab",
    "TypeBitbucket",
    "TypeGoogle",
    "TypeBox",
    "TypeTest"
  ]
}

Properties

Name Type Required Restrictions Description
anonymous string false none

Enumerated Values

Property Value
anonymous [github, gitlab, bitbucket, google, box]

provider.CreateProviderRequest

{
  "properties": {
    "clientId": {
      "type": "string"
    },
    "clientSecret": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "type": {
      "enum": [
        "github",
        "gitlab",
        "bitbucket",
        "google",
        "box"
      ],
      "type": "string",
      "x-enum-varnames": [
        "TypeGithub",
        "TypeGitlab",
        "TypeBitbucket",
        "TypeGoogle",
        "TypeBox",
        "TypeTest"
      ]
    }
  },
  "required": [
    "clientId",
    "clientSecret",
    "name",
    "type"
  ],
  "type": "object"
}

Properties

Name Type Required Restrictions Description
clientId string true none
clientSecret string true none
name string true none
type oauthprovider.Type true none

provider.UpdateProviderRequest

{
  "properties": {
    "clientSecret": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "status": {
      "enum": [
        "active",
        "inactive",
        "disabled",
        "deleted"
      ],
      "type": "string",
      "x-enum-varnames": [
        "DefaultStatus",
        "StatusActive",
        "StatusInvalid",
        "StatusDeleting",
        "StatusDeletionFailed"
      ]
    }
  },
  "type": "object"
}

Properties

Name Type Required Restrictions Description
clientSecret string false none
name string false none
status oauthprovider.Status false none