openapi: 3.0.0 info: title: Construction.Account.Admin Account Management API version: '1.0' contact: name: Autodesk Plaform Services url: https://aps.autodesk.com/ email: aps.help@autodesk.com termsOfService: https://www.autodesk.com/company/legal-notices-trademarks/terms-of-service-autodesk360-web-services/forge-platform-web-services-api-terms-of-service x-support: https://stackoverflow.com/questions/tagged/autodesk-platform-services description: 'The Account Admin API automates creating and managing projects, assigning and managing project users, and managing member and partner company directories. You can also synchronize data with external systems. ' servers: - url: https://developer.api.autodesk.com security: - 2-legged: [] - 3-legged: [] tags: - name: Account Management paths: /authentication/v2/service-accounts: parameters: [] post: tags: - Account Management summary: Create Service Account description: 'Creates a service account. Only a server-to-server application can own service accounts. An application can have up to 10 service accounts at any given time. Upon a successful response, the operation returns the service account ID and email address.' operationId: create-service-account requestBody: content: application/json: schema: $ref: '#/components/schemas/create-service-account-payload' examples: CreateByOwner: value: name: test-service-account firstName: ServiceAccount lastName: ServiceAccount required: true description: '' responses: '201': description: Successful request; the service account has been created. content: application/json: schema: $ref: '#/components/schemas/service-account' examples: Created: value: serviceAccountId: EXAMPLE_SA_ID_001 email: test-service-account@EXAMPLE_CLIENT_ID_32CHARXXXXXXXXXXXXXXXX.adskserviceaccount.autodesk.com '400': description: The request could not be understood by the server due to malformed syntax. '401': description: The access token is invalid. It may have either expired or may not be a two-legged access token. Please verify the token and retry the request. '403': description: The provided Client ID is wrong or the number of service accounts that the application can have has reached the limit. Please verify the Client ID. If you've reached the limit, delete unused service accounts to create capacity. '500': description: An unknown server-side error occurred. Please try again later. If the problem persists, please contact support. security: - 2-legged: - application:service_account:write x-codegen-request-body-name: body x-stoplight: id: tpzio13lzcdso get: tags: - Account Management summary: Get All Service Accounts description: Retrieves all service accounts associated with an application. operationId: get-all-service-accounts responses: '200': description: Successful request; the service accounts have been retrieved. content: application/json: schema: $ref: '#/components/schemas/service-accounts' examples: GetAll: value: serviceAccounts: - serviceAccountId: EXAMPLE_SA_ID_001 email: testserviceaccount1@EXAMPLE_CLIENT_ID_32CHARXXXXXXXXXXXXXXXX.adskserviceaccount.autodesk.com createdBy: EXAMPLE_CLIENT_ID_32CHARXXXXXXXXXXXXXXXX status: ENABLED createdAt: 2024-01-25 03:08:04.156576834 +0000 UTC accessedAt: 2024-01-25 03:08:04.156576834 +0000 UTC expiresAt: 2025-01-25 03:08:04.156576834 +0000 UTC - serviceAccountId: EXAMPLE_SA_ID_002 email: testserviceaccount1@EXAMPLE_CLIENT_ID_32CHARXXXXXXXXXXXXXXXX.adskserviceaccount.autodesk.com createdBy: EXAMPLE_CLIENT_ID_32CHARXXXXXXXXXXXXXXXX status: DISABLED createdAt: 2024-01-25 03:08:04.156576834 +0000 UTC accessedAt: 2024-01-25 03:08:04.156576834 +0000 UTC expiresAt: 2025-01-25 03:08:04.156576834 +0000 UTC '401': description: Unauthorized; The token has expired, is invalid, or is not a two-legged token. Make sure a valid two-legged token is used. '403': description: Invalid client; The client is wrong. Make sure the correct client id is used. '500': description: An unknown server-side error occurred. Please try again later. If the problem persists, please contact support. security: - 2-legged: - application:service_account:read x-stoplight: id: xc6573tw5d56n /authentication/v2/service-accounts/{serviceAccountId}: parameters: [] get: tags: - Account Management summary: Get Service Account description: Retrieves the details for a service account. operationId: get-service-account parameters: - name: serviceAccountId in: path description: The Autodesk ID of the service account required: true schema: type: string responses: '200': description: Successful request; the service account has been retrieved. content: application/json: schema: $ref: '#/components/schemas/service-account-details' examples: Get: value: serviceAccountId: test-user-id-1 email: test@EXAMPLE_CLIENT_ID_32CHARXXXXXXXXXXXXXXXX.adskserviceaccount.autodesk.com createdBy: EXAMPLE_CLIENT_ID_32CHARXXXXXXXXXXXXXXXX status: ENABLED createdAt: 2024-01-25 03:08:04.156576834 +0000 UTC accessedAt: 2024-01-25 03:08:04.156576834 +0000 UTC expiresAt: 2025-01-25 03:08:04.156576834 +0000 UTC '401': description: Unauthorized; The token has expired, is invalid, or is not a two-legged token. Make sure a valid two-legged token is used. '404': description: Not found; The service account is not found. '500': description: An unknown server-side error occurred. Please try again later. If the problem persists, please contact support. security: - 2-legged: - application:service_account:read x-stoplight: id: a5b64qrnha1k0 patch: tags: - Account Management summary: Enable or Disable Service Account description: 'Enables or disables a service account. When a service account is in a disabled state, it loses its capability to manage its service account key. Assertions signed by the key will be treated as invalid. This operation allows enabling a service account that is in a deactivated state.' operationId: enable-disable-service-account parameters: - name: serviceAccountId in: path description: The Autodesk ID of the service account required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/enable-disable-service-account-payload' examples: Example: value: status: ENABLED required: true description: '' responses: '200': description: Successful request; the service account has been updated. content: application/json: schema: $ref: '#/components/schemas/service-account-details' examples: EnabledDisable: value: serviceAccountId: test-user-id-1 email: test@EXAMPLE_CLIENT_ID_32CHARXXXXXXXXXXXXXXXX.adskserviceaccount.autodesk.com createdBy: EXAMPLE_CLIENT_ID_32CHARXXXXXXXXXXXXXXXX status: ENABLED createdAt: 2024-01-25 03:08:04.156576834 +0000 UTC accessedAt: 2024-01-25 03:08:04.156576834 +0000 UTC expiresAt: 2025-01-25 03:08:04.156576834 +0000 UTC '400': description: Invalid request; The service account is already in an enabled or disabled state. Make sure the state is actually changed. '401': description: Unauthorized; The token has expired, is invalid, or is not a two-legged token. Make sure a valid two-legged token is used. '404': description: Not found; The service account is not found. '500': description: An unknown server-side error occurred. Please try again later. If the problem persists, please contact support. security: - 2-legged: - application:service_account:write delete: tags: - Account Management summary: Delete Service Account description: Deletes an existing service account. When a service account is deleted, all associated keys will also be deleted. operationId: delete-service-account parameters: - name: serviceAccountId in: path description: The Autodesk ID of the service account required: true schema: type: string responses: '204': description: Successful request; the service account has been deleted. '401': description: Unauthorized; The token has expired, is invalid, or is not a two-legged token. Make sure a valid two-legged token is used. '404': description: Not found; The service account is not found. '500': description: An unknown server-side error occurred. Please try again later. If the problem persists, please contact support. security: - 2-legged: - application:service_account:write components: schemas: service-account-details: title: Service Account Details type: object description: Contains details of a service account properties: serviceAccountId: type: string description: The Autodesk ID of the service account email: type: string description: The email address of the service account createdBy: type: string description: The client ID used to create the service account status: type: string description: The status of the service account enum: - ENABLED - DISABLED - DEACTIVATED createdAt: type: string format: date-time description: The creation time of the service account accessedAt: type: string format: date-time description: This is the most recent time an access token was generated for this service account expiresAt: type: string format: date-time description: The expiration time of the service account service-accounts: title: Service Accounts description: '' type: object properties: serviceAccounts: type: array description: Contains details of a list of service accounts items: $ref: '#/components/schemas/service-account-details' create-service-account-payload: title: Create Service Account Payload x-stoplight: id: aba1854d12b73 type: object description: The request body for create service account properties: name: type: string description: The name of the service account. This name must be between 5 and 100 characters, and can contain alphanumeric characters and dashes, and include at least one alphanumeric character. firstName: type: string description: 'The first name of the service account. For display purposes only. Must meet the following conditions: Length between 5 and 100 characters, contain only alphanumeric characters, dashes, and underscores, include at least one alphanumeric character, avoid inappropriate words, exclude invalid characters such as % and /, and avoid the character pattern &#. For more information, see Naming Guidelines.' lastName: type: string description: 'The last name of the service account. For display purposes only. Must meet the following conditions: Length between 5 and 100 characters, contain only alphanumeric characters and dashes, include at least one alphanumeric character, avoid inappropriate words, exclude invalid characters such as % and /, and avoid the character pattern &#. For more information, see Naming Guidelines.' required: - name - firstName - lastName enable-disable-service-account-payload: title: Enable or Disable Service Account Request x-stoplight: id: r1ar35l7hi8a7 type: object description: The request body for enable or disable service account properties: status: type: string description: The status of the service account $ref: '#/components/schemas/status' required: - status status: type: string enum: - ENABLED - DISABLED service-account: title: Service Account x-stoplight: id: fc1272d6180f6 type: object description: Contains the details of a newly created service account properties: serviceAccountId: type: string description: The Autodesk ID of the service account email: type: string description: The email address of the service account. It is of the form @.adskserviceaccount.autodesk.com. securitySchemes: 2-legged: type: oauth2 flows: clientCredentials: tokenUrl: '' refreshUrl: '' scopes: {} 3-legged-implicit: type: oauth2 flows: implicit: authorizationUrl: '' refreshUrl: '' scopes: {} 3-legged: type: oauth2 flows: authorizationCode: authorizationUrl: '' tokenUrl: '' refreshUrl: '' scopes: {} x-stoplight: id: zm6m3b30rcbon