arazzo: 1.0.1
info:
title: Datadog Invite a User
summary: Create (invite) a user for the organization, read it back, then list users.
description: >-
A common user-provisioning pattern on the Datadog v2 Users API. The workflow
creates a user for the organization by email, fetches the created user by id
to confirm it exists, and then lists all users so the new account can be
located among them. Every step spells out its request inline so the flow can
be read and executed without opening the underlying OpenAPI description.
version: 1.0.0
sourceDescriptions:
- name: allApi
url: ../openapi/datadog-all-api-openapi.yml
type: openapi
- name: createApi
url: ../openapi/datadog-create-api-openapi.yml
type: openapi
- name: getApi
url: ../openapi/datadog-get-api-openapi.yml
type: openapi
workflows:
- workflowId: invite-user
summary: Create a Datadog user, get it, then list all users.
description: >-
Creates a user for the organization with the supplied email, reads it back
by id, and lists all users in the organization.
inputs:
type: object
required:
- email
properties:
email:
type: string
description: The email address of the user to create.
name:
type: string
description: Optional display name of the user.
title:
type: string
description: Optional title of the user.
steps:
- stepId: createUser
description: Create a user for the organization with the supplied attributes.
operationId: $sourceDescriptions.createApi.CreateUser
requestBody:
contentType: application/json
payload:
data:
type: users
attributes:
email: $inputs.email
name: $inputs.name
title: $inputs.title
successCriteria:
- condition: $statusCode == 201
outputs:
userId: $response.body#/data/id
- stepId: getUser
description: Fetch the created user by id to confirm the account exists.
operationId: $sourceDescriptions.getApi.GetUser
parameters:
- name: user_id
in: path
value: $steps.createUser.outputs.userId
successCriteria:
- condition: $statusCode == 200
outputs:
userStatus: $response.body#/data/attributes/status
userEmail: $response.body#/data/attributes/email
- stepId: listUsers
description: List all users in the organization so the new account can be located.
operationId: $sourceDescriptions.allApi.ListUsers
parameters:
- name: filter
in: query
value: $inputs.email
successCriteria:
- condition: $statusCode == 200
outputs:
users: $response.body#/data
outputs:
userId: $steps.createUser.outputs.userId
userStatus: $steps.getUser.outputs.userStatus
users: $steps.listUsers.outputs.users
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.