Zanshin API (1.0.5)

Download OpenAPI specification:Download

This is the documentation for the Zanshin Product API. Zanshin is a vulnerability management platform that manages cloud risks on service providers for your company. Learn more at https://www.tenchisecurity.com/.

Note: This documentation file covers the current endpoint only.

System overview

Zanshin is a platform where organizations are registered and then can register their cloud environments into the system for regular security checks. Organizations can register scan Targets, as the name implies, those are the target cloud accounts that will be scanned and monitored for potential security breachs.

Once one or more scan targets are registered the system will periodically run scans, those scans will generate security alerts that can be viewed and will provide details about the detected breach, why it is a breach, which renowed guidelines does it violate, the best practice for a fix, the affected resources and other usefull data. The scan history will also be preserved so the organization can keep track of the over time improvements.

Beyond scanning their own cloud infrastructures Zanshin provides organizations with the ability to follow and be followed by other organizations, in a social-network-like environment. When a organization follows another it can see the alerts and potential secutrity issues of the followed organization. This creates a situation where an organization that has several service provider can follow all of them and be assured that they are all following the best cyber security practices. The organizations that are being followed can allow clients and potential hirers to follow them and show off their awesome security skills to their employers.

Main concepts

  • User: an user account inside the system. One login. A user must be a member of one or more organizations. Users cannot follow or be followed, they inherit the follows as followings permissions of their organizations.

  • Member a user inside of an organization is a member of that organization. They can be admins with the powers to create and configure scan targets, accept risks, etc. or regular members with read-only permissions.

  • Organization the enitity representing a company, businness, or sector of a company it has members, it has scan targets and it can follow and be followed by other organizations. Some companies make different organizations for each of their internal divisions and follow each other.

  • Followers the organizations that follow your organization. Akin to social networks followers can see the situation of your scan targets and track your alerts. Some sensitive data relating to the alerts may be censored to the followers.

  • Following the organizations that your organization is currently following. You will be able to see their satus on each of the scan targets and keep track of any security issues they have.

  • Scan target a single cloud account (be it GCP, AWS, Azure, etc) it is a target of the scans. Where the security checks will happen. One organization may have as many scan targets as they wish.

  • Scan the results of a security check of a given scan target, it will happen periodically and automatically but can also be triggered manually.

  • Alert a scan will generate several alerts for each scan target (or none if your security is pristine). Alerts are just that, alerts of potential security failures or guidelines not being followed. Alerts have all the info you need on the problem severity and how to handle it. They can be viewed by the followers. ALerts cannot be manually closed, they are only considered closed when the next scan detects that the problem has been solved.

Programmatically Accessing endpoints

To use the documented endpoints of this documentation login into zanshin and Generate API Keys from the menu. Use the newly generate key as the {AUTH_TOKEN} mentioned through the docs.

Documentation

Gets the html documentation

Gets the documentation

An endpoint to access this documentation.

Authorizations:
zanshin_auth

Responses

Request samples

curl -X GET "https://api.zanshin.tenchisecurity.com" -H  "accept: text/html"

Account

Current logged user

Get current user data

Gets all data for the current logged user

Authorizations:
zanshin_auth

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/me' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
{
  • "id": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "name": "Miyamoto Musashi",
  • "email": "niten_doraku@edo.com",
  • "roles": [ ],
  • "member": [
    ],
  • "following": [
    ],
  • "metadata": {
    },
  • "isSocial": true,
  • "emailVerified": true,
  • "identityProvider": "auth0",
  • "loginsCount": 23,
  • "lastIp": "192.168.0.1",
  • "status": "ACTIVE",
  • "lastLogin": "2022-01-15T12:34:56.123Z",
  • "updatedAt": "2022-01-15T12:34:56.123Z",
  • "createdAt": "2021-01-13T12:34:56.123Z"
}

Get current user invites

Get all invitations currently pending for the logged user - most invites are relative to joining an organization.

Authorizations:
zanshin_auth

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/me/invites' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
[
  • {
    }
]

Get invite details by token

Gets an specific invitation details, it only works if the invitation was made for the current logged user

Authorizations:
zanshin_auth
path Parameters
token
required
string

Token that uniquely identifies the invitation

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/me/invites/4zzzCCCCCbbbbb888888SSsSSSSsssss31sssSs00000' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
{
  • "organizationId": "00000000-0000-4000-a000-000000000001",
  • "organizationName": "Niten Ichi-ryu",
  • "email": "niten_doraku@edo.com",
  • "token": "4zzzCCCCCbbbbb888888SSsSSSSsssss31sssSs00000",
  • "roles": [ ],
  • "expiredAt": "2021-01-13T12:34:56.123Z",
  • "createdAt": "2021-01-13T12:34:56.123Z"
}

Accepts an invite

Accepts an inivitation with the informed ID, it only works if the user accepting the invitation is the user that received the invitation.

Authorizations:
zanshin_auth
path Parameters
token
required
string

Token that uniquely identifies the invitation

Responses

Request samples

curl -X 'POST' \
'https://api.zanshin.tenchisecurity.com/me/invites/{token}/accept' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-d ''

Response samples

Content type
application/json
{
  • "organizationId": "00000000-0000-4000-a000-000000000001",
  • "userId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "email": "niten_doraku@edo.com",
  • "name": "Miyamoto Musashi",
  • "roles": [ ],
  • "updatedAt": "2021-01-13T12:34:56.123Z",
  • "createdAt": "2021-01-13T12:34:56.123Z"
}

List user active api keys

Lists all active API Keys for an user, API Keys can be used to interact directly with the zanshin API on the behalf of that user.

Authorizations:
zanshin_auth

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/me/apikeys' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Creates a new API Key for the current user

Cretes a new API key for the current logged user, API Keys can be used to interact with the zanshin api directly on behalf of that user.

Authorizations:
zanshin_auth
Request Body schema: application/json

Key Name

name
string (name)

The key name

Responses

Request samples

Content type
application/json
{
  • "name": "Jomae-ya"
}

Response samples

Content type
application/json
{
  • "id": "12349876-bbbb-aaaa-8888-222220000fff",
  • "name": "Jomae-ya",
  • "key": "***123-Aa",
  • "userId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "createdAt": "2021-01-13T12:34:56.123Z"
}

Deletes an api key by its id

Deletes a given api key by its id, it will only work if the informed ID belongs to the current logged user.

Authorizations:
zanshin_auth
path Parameters
apiKeyId
required
string

Key that grants access to the api

Responses

Request samples

curl -X 'DELETE' \
'https://api.zanshin.tenchisecurity.com/me/apikeys/{apiKeyId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
true

Get logged user to create issue on freshdesk

Get logged user identifier to create freshdesk issue

Authorizations:
zanshin_auth

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/me/freshdesk' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
{
  • "token": "000000000000000000000000000000000000.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0000000000000000000000000000000000000000000"
}

Organizations

Info about all organizations

List all user organizations

Lists all organizations that the current logged user belongs to.

Authorizations:
zanshin_auth

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
[]

Create organization

Creates a new organization to be owned by the current logged user.

Authorizations:
zanshin_auth
Request Body schema: application/json

Organization Name

name
string (name)

The organization name

email
string (email)

The organization e-mail

picture
string (Picture)

Organization profile picture

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "statusCode": 400,
  • "error": "BadRequest",
  • "message": "string"
}

Details an organization by ID

Gets an organization details given its ID.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-0000-4000-a000-000000000002' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
{}

Edit an organization by ID

Edits an organization data given its ID, the operation will only succeed if the logged user is an administrator of the given organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Request Body schema: application/json

Organization Name

name
string (name)

Organization Name

picture
string (picture)

Image URL, accepted formats: jpg, jpeg, png, svg

email
string (email)

Contact e-mail

Responses

Request samples

Content type
application/json
{
  • "name": "Org Name",
  • "picture": "<image URL>",
  • "email": "niten@ichi-ryu.com"
}

Response samples

Content type
application/json
{}

Delete organization by ID

Deletes an organization given its ID, the operation will only succeed if the logged user is an administrator of the informed organization. This operation cannot be undone.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Responses

Request samples

curl -X 'DELETE' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-0000-4000-a000-000000000002' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
true

Organization Questionnaires

Organization Questionnaires

Organization Members

Manage organization members

List organization members

Lists all organization members given the organization ID.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-0000-4000-a000-000000000002/members' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
[
  • {
    }
]

Get organization member details

Gets a user data if and only if the user is a member of the organization given both IDs. Data will only be returned if the logged user is an organization administrator and the user is a member of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

userId
required
string

User unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/members/{userId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
[
  • {
    }
]

Edit user membership

Makes an user an admin or removes admin for an user. The requesting user must be an organization administrator to use this endpoint.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

userId
required
string

User unique identifier

Request Body schema: application/json

Organization member body

roles
Array of strings (roles)

New roles

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "userId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "name": "Niten Ichi-ryu",
  • "email": "niten_doraku@edo.com",
  • "roles": [
    ],
  • "identityProvider": "auth0",
  • "loginsCount": 23,
  • "lastIp": "192.168.0.1",
  • "lastLogin": "1645-06-13T12:34:56.123Z",
  • "updatedAt": "2022-01-15T12:34:56.123Z",
  • "createdAt": "2021-01-01T12:34:56.123Z"
}

Remove user from organization

Removes and user form a organization given both IDs. The logged user must be an organization administrator to invoke this endpoint. The target user must currently be and organization member for anything to happen.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

userId
required
string

User unique identifier

Responses

Request samples

curl -X 'DELETE' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/members/{userId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
true

Lists all organization invites

Lists all pending invitations that an organization has given its ID. The logged user must be an organization administrator to fetch the data.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/invites' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
[
  • {
    }
]

Create invitation from organization

Issues an invitation from the given organization (informed as a path param) to a target (informed on the body). The logged user must be an administrator of the organization informed as a path param to invoke this endpoint.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Request Body schema: application/json

Invite data

email
string (email)

Email to invite

roles
Array of strings (roles)

New roles

Responses

Request samples

Content type
application/json
{
  • "email": "niten_doraku@edo.com",
  • "roles": [ ]
}

Response samples

Content type
application/json
{
  • "organizationId": "00000000-0000-4000-a000-000000000001",
  • "organizationName": "Niten Ichi-ryu",
  • "email": "niten_doraku@edo.com",
  • "roles": [ ],
  • "expiredAt": "2021-06-01T12:34:56.123Z",
  • "createdAt": "2021-01-13T12:34:56.123Z"
}

Get organization invites by email

Lists all invites made to a informed email on behalf of the informed organization. The logged user must be an administratir of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

email
required
string <email>

User registered email

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/invites/{email}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
{
  • "organizationId": "00000000-0000-4000-a000-000000000001",
  • "organizationName": "Niten Ichi-ryu",
  • "email": "niten_doraku@edo.com",
  • "roles": [ ],
  • "expiredAt": "2021-06-01T12:34:56.123Z",
  • "createdAt": "2021-01-13T12:34:56.123Z"
}

Invalidate organization invite

Invalidates an invite made to the informed email on behalf of the informed organization. The logged user must be an administratir of the organization ti use this endpoint.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

email
required
string <email>

User registered email

Responses

Request samples

curl -X 'DELETE' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/invites/{email}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
true

Resend organization invitation

Resends an invite made to the informed email on behalf of the informed organization. The logged user must be an administrator of the organization to use this endpoint.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

email
required
string <email>

User registered email

Responses

Request samples

curl -X 'POST' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/invites/{email}/resend' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-d ''

Response samples

Content type
application/json
true

Reset organization member mfa

An email will be sent to the user with instructions for resetting the MFA.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

userId
required
string

User unique identifier

Responses

Request samples

curl -X 'POST' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/members/{userId}/mfa/reset' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-d ''

Response samples

Content type
application/json
true

Reset organization member password

An email will be sent to the user with instructions for resetting the password.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

userId
required
string

User unique identifier

Responses

Request samples

curl -X 'POST' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/members/{userId}/password/reset' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-d ''

Response samples

Content type
application/json
true

Organization Followers

Manage followers

List organization followers

Lists all organization followers given the organization ID. The logged user must be an administrator of the organization to use this endpoint.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/followers' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
[
  • {
    }
]

Remove Follower

Remove a follower given both the followed and follower organization IDs. The requesting user must be an administrator of the followed organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

followerId
required
string

A follower organization unique identifier

Responses

Request samples

curl -X 'DELETE' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/followers/{followerId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
true

List follow requests

Lists all organization follow requests given the organization ID. The logged user must be an administrator of the organization to use this endpoint.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/followers/requests' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
[
  • {
    }
]

Create follow request

Create a follow request from the given organization (informed in the path) to the target organization (informed on the body). The logged user must be an administrator of the path informed organization to use this endpoint.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Request Body schema: application/json

Organization Id for the to be followed org

token
string

Responses

Request samples

Content type
application/json
{
  • "token": "00000000-0000-4000-a000-000000000002"
}

Response samples

Content type
application/json
{
  • "id": "00000000-0000-4000-a000-000000000001",
  • "name": "Niten Ichi-ryu",
  • "status": "ACTIVE",
  • "updatedAt": "2022-01-15T12:34:56.123Z",
  • "createdAt": "2021-01-01T12:34:56.123Z"
}

Details follow request

Get a follow request details given the organization ID and a follow erquest unique identifier. The follow request identifier must be valid and must have been issued by or to the organization. The logged user must be an administrator of the organization to use this endpoint.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

followerId
required
string

A follower organization unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/followers/requests/{followerId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
{
  • "id": "00000000-0000-4000-a000-000000000001",
  • "name": "Niten Ichi-ryu",
  • "status": "ACTIVE",
  • "updatedAt": "2022-01-15T12:34:56.123Z",
  • "createdAt": "2021-01-01T12:34:56.123Z"
}

Cancel follow request

Cancels an issued follow request given the organization ID and a follow request unique identifier. The follow request identifier must be valid and must have been issued by the organization. The logged user must be an administrator of the organization to use this endpoint.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

followerId
required
string

A follower organization unique identifier

Responses

Request samples

curl -X 'DELETE' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/followers/requests/{followerId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
true

Organization Following

Manage following

List followed organizations

List all companies that are being followed by a given organization. The logged user must be an administrator of the given organization

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/following' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
[
  • {
    }
]

Detail following

Get details for the following.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

followingId
required
string

A following organization unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/following/{followingId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
{}

Stop following

Stops following the provided organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

followingId
required
string

A following organization unique identifier

Responses

Request samples

curl -X 'DELETE' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/following/{followingId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
true

List follow request

List all following requests (when a company asks you to follow them) received by a given organization. The logged user must be an administrator of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/following/requests' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
[
  • {
    }
]

Accepts a follow request

Accepts a following requests (become a follower of) given organization. The logged user must be an administrator of the accepting organization. The token must be valid and submitted to the informed organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

followingId
required
string

A following organization unique identifier

Responses

Request samples

curl -X 'POST' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/following/requests/{followingId}/accept' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-d ''

Response samples

Content type
application/json
{
  • "id": "00000000-0000-4000-a000-000000000001",
  • "name": "Niten Ichi-ryu",
  • "status": "ACTIVE",
  • "updatedAt": "2022-01-15T12:34:56.123Z",
  • "createdAt": "2021-01-01T12:34:56.123Z"
}

Decline follow request

Declines a following request (decline to become a follower of) given organization. The logged user must be an administrator of the declining organization. The requesting company must be valid and have submitted a prior following request.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

followingId
required
string

A following organization unique identifier

Responses

Request samples

curl -X 'POST' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/following/requests/{followingId}/decline' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-d ''

Response samples

Content type
application/json
true

Organization Following Tags

Manage following tags

List all tags followed organizations

List all tags companies that are being followed by a given organization. The logged user must be an member of organization

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/following/tags' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
[
  • "design",
  • "financial",
  • "customer",
  • "payment"
]

Organization Scan Targets

Manage Scan Targets

Lists organization scan targets

List all scan targets given an organization ID. The logged user must be a member of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/scantargets' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
[
  • {
    }
]

Create scan target

Create a scan targets given an organization ID. The logged user must be a member of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Request Body schema: application/json

Scan target Data to create

name
string (ScanTargetName)

The scan target display name

kind
string (kind)
Enum: "AWS" "AZURE" "BITBUCKET" "DOMAIN" "GCP" "GITHUB" "GITLAB" "GWORKSPACE" "HUAWEI" "JIRA" "MS365" "ORACLE" "SALESFORCE" "SLACK"

The type of resource this scan target represents, either a cloud service provider or external attack surface asset

ScanCredentialAWS (object) or ScanCredentialGCP (object) or ScanCredentialAzure (object) or ScanCredentialDOMAIN (object) or ScanCredentialHUAWEI (object) or ScanCredentialORACLE (object) or ScanCredentialGWORKSPACE (object) or ScanCredentialMS365 (object) or ScanCredentialGITHUB (object) or ScanCredentialSLACK (object) or ScanCredentialBITBUCKET (object) or ScanCredentialJIRA (object) (credential)

Credentials

schedule
string (schedule)
Default: "24h"
Enum: "6h" "12h" "24h" "7d"

Schedule when the scan target will run, if it is blank the 24h default option is defined

Responses

Request samples

Content type
application/json
{
  • "name": "Kami Fujiwara",
  • "kind": "AWS",
  • "credential": {
    },
  • "schedule": "24h"
}

Response samples

Content type
application/json
{
  • "id": "00000000-0000-4000-a000-000000000001",
  • "organizationId": "00000000-0000-4000-a000-000000000001",
  • "name": "Kami Fujiwara",
  • "kind": "AWS",
  • "status": "ACTIVE",
  • "account": "tenchisecurity.com",
  • "credential": {
    },
  • "schedule": "24h",
  • "updatedAt": "2022-01-15T12:34:56.123Z",
  • "createdAt": "2021-01-01T12:34:56.123Z"
}

Detail scan target

Get details of a scan target given both the organization and scan target IDs. The logged user must be a member of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

scanTargetId
required
string

Scan target unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/scantargets/{scanTargetId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
{
  • "id": "00000000-0000-4000-a000-000000000001",
  • "organizationId": "00000000-0000-4000-a000-000000000001",
  • "name": "Kami Fujiwara",
  • "kind": "AWS",
  • "status": "ACTIVE",
  • "account": "tenchisecurity.com",
  • "credential": {
    },
  • "schedule": "24h",
  • "updatedAt": "2022-01-15T12:34:56.123Z",
  • "createdAt": "2021-01-01T12:34:56.123Z"
}

Edit scan target

Edits a scan target given both the organization and scan target IDs. The logged user must be a member of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

scanTargetId
required
string

Scan target unique identifier

Request Body schema: application/json

Scan target Data to create

name
string (Scan target name)

Scan Target Name

schedule
string (schedule)

Schedule when the scan target will run, if it is blank the 24h default option is defined

secret
string (secret)

Azure and MS365 scan targets support updating the credential secret field. Not to be used together with the other values.

Responses

Request samples

Content type
application/json
{
  • "name": "New name",
  • "schedule": "24h",
  • "secret": "Ae1esonZpTFqt0Kwzdwqb4lYgUtLK1eeWotaaF"
}

Response samples

Content type
application/json
true

Remove a scan target

Remove a scan target given both the organization and scan target IDs. The logged user must be a admin of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

scanTargetId
required
string

Scan target unique identifier

Responses

Request samples

curl -X 'DELETE' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/scantargets/{scanTargetId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
true

Manually trigger scan

Manually trigger the scan of a scan target. The requesting user must be a admin of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

scanTargetId
required
string

Scan target unique identifier

query Parameters
force
string

If 'true', ignore current state and attempt scan anyway. If 'false', will not run scan target with status NEW, \ ERROR, INVALID_CREDENTIAL or RUNNING

Responses

Request samples

curl -X 'POST' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/scantargets/{scanTargetId}/scan' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-d ''

Response samples

Content type
application/json
{
  • "organizationId": "a72f4225-43e9-4922-b6b7-8b0620bdb1c0",
  • "scanTargetId": "45cec8fe-f9f8-4df8-b255-14bf1dae3ab3",
  • "slot": "string",
  • "status": "RUNNING",
  • "execution": "arn:aws:states:us-x-x:account_id:execution:x:45cec8fe-f9f8-4df8-b255-14bf1dae3ab3-20211207-150048341"
}

Check the scantarget

Checks if the scan target has proper connectivity with the underlying cloud service provider account, without actually performing a scan. The requesting user must be an administrator of the organization owning the scan target.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

scanTargetId
required
string

Scan target unique identifier

Responses

Request samples

curl -X 'POST' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/scantargets/{scanTargetId}/check' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-d ''

Response samples

Content type
application/json
{
  • "id": "00000000-0000-4000-a000-000000000001",
  • "organizationId": "00000000-0000-4000-a000-000000000001",
  • "name": "Kami Fujiwara",
  • "kind": "AWS",
  • "status": "ACTIVE",
  • "account": "tenchisecurity.com",
  • "credential": {
    },
  • "schedule": "24h",
  • "updatedAt": "2022-01-15T12:34:56.123Z",
  • "createdAt": "2021-01-01T12:34:56.123Z"
}

List the scans of a scan target

Lists the scan history of a given scan target. The requesting user must be a member of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

scanTargetId
required
string

Scan target unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/scantargets/{sncaTargetId}/scans' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

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

Details a scan

Get detailed data for a specific scan execution. The requesting user must be a member of the organization owning the scan target.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

scanTargetId
required
string

Scan target unique identifier

slot
required
integer <int64>

ID of the scan to return

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/scantargets/{scanTargetId}/scans/{scanId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
{
  • "execution": "arn:aws:states:us-x-x:account_id:execution:x:45cec8fe-f9f8-4df8-b255-14bf1dae3ab3-20211207-150048341",
  • "organizationId": "00000000-0000-4000-a000-000000000001",
  • "scanTargetId": "fa000000-0000-4000-a000-000000000001",
  • "slot": "2021-03-08T00:06:02.377Z",
  • "status": "RUNNING",
  • "summary": {
    },
  • "updatedAt": "2022-01-15T12:34:56.123Z",
  • "createdAt": "2022-01-15T12:34:56.123Z"
}

Organization Scan Target Groups

Manage Scan Targets Groups

Lists organization scan target groups

List all scan target groups given an organization ID. The logged user must be a member of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{organizationId}/scantargetgroups' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
[
  • {
    }
]

Create scan target Group

Create a scan target group given an organization ID. The logged user must be an admin of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Request Body schema: application/json

Scan Target Group Data to create

name
string (ScanTargetGroupName)

The scan target group assigned name

kind
string (kind)
Enum: "ORACLE" "BITBUCKET"

The type of cloud of this scan target group

Responses

Request samples

Content type
application/json
{
  • "name": "Kami Fujiwara group",
  • "kind": "ORACLE"
}

Response samples

Content type
application/json
{
  • "id": "00000000-0000-4000-a000-000000000001",
  • "organizationId": "00000000-0000-4000-a000-000000000001",
  • "name": "Kami Fujiwara",
  • "kind": "ORACLE",
  • "credential": "{}"
}

Details of scan targets in a group

Get details of a scan target group given both the organization and scan target group IDs. The logged user must be a member of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

scanTargetGroupId
required
string

Scan target group unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{organizationId}/scantargetgroups/{scanTargetGroupId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
{
  • "id": "00000000-0000-4000-a000-000000000001",
  • "organizationId": "00000000-0000-4000-a000-000000000001",
  • "name": "Resource Rollup",
  • "kind": "ORACLE",
  • "credential": {
    }
}

Remove a scan target group

Remove a scan target group given both the organization and scan target group ID. The logged user must be an admin of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

scanTargetGroupId
required
string

Scan target group unique identifier

query Parameters
deleteScanTargets
boolean
Example: deleteScanTargets=true

Responses

Request samples

curl -X 'DELETE' \
'https://api.zanshin.tenchisecurity.com/organizations/{organizationId}/scantargetgroups/{scanTargetGroupId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
true

Update scan target Group

Update an already created scan target group with the terraform returned data, given an organization ID. The logged user must be an admin of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

scanTargetGroupId
required
string

Scan target group unique identifier

Request Body schema: application/json

Scan Target Group Data to update

name
string (ScanTargetGroupName)

The scan target group assigned name

Responses

Request samples

Content type
application/json
{
  • "name": "Kami Fujiwara group"
}

Response samples

Content type
application/json
{
  • "name": "Kami Fujiwara group",
  • "kind": "ORACLE",
  • "credential": {
    }
}

Insert scan target group credential

Insert an already created scan target group with the terraform returned data, given an organization ID. The logged user must be an admin of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

scanTargetGroupId
required
string

Scan target group unique identifier

Request Body schema: application/json

Scan Target Group Data to insert

ScanTargetGroupCredentiaListlORACLE (object) (credential)

Credentials

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "name": "Kami Fujiwara group",
  • "kind": "ORACLE",
  • "credential": {
    }
}

Scan Targets from a scan target group

Get all scan targets from a specific scan target group. The logged user must be a member of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

scanTargetGroupId
required
string

Scan target group unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/scantargetgroups/{scanTargetGroupId}/scantargets' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
{
  • "id": "00000000-0000-4000-a000-000000000001",
  • "organizationId": "00000000-0000-4000-a000-000000000001",
  • "name": "Kami Fujiwara",
  • "kind": "AWS",
  • "status": "ACTIVE",
  • "account": "tenchisecurity.com",
  • "credential": {
    },
  • "schedule": "24h",
  • "updatedAt": "2022-01-15T12:34:56.123Z",
  • "createdAt": "2021-01-01T12:34:56.123Z"
}

List Compartments

Get all compartments from a specific scan target group. The logged user must be a member of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

scanTargetGroupId
required
string

Scan target group unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/scantargetgroups/{scanTargetGroupId}/targets' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
Example
[ ]

Create Scan Target by compartments

Create Scan Targets from previous listed compartments inside the scan target group. The logged user must be a member of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

scanTargetGroupId
required
string

Scan target group unique identifier

Request Body schema: application/json

Compartments

One of
Array
name
string (name)

Compartment name

ocid
string (ocid)

Oracle Compartment Id

Responses

Request samples

Content type
application/json
[ ]

Response samples

Content type
application/json
[
  • {
    }
]

Script from scan target group

Get the terraform download URL of the scan target group. The logged user must be a member of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

scanTargetGroupId
required
string

Scan target group unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/scantargetgroups/{scanTargetGroupId}/scripts' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json

Organization Events

Manage Events

List the events of an organization

List the events of an organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

query Parameters
end
string <date-time>
Example: end=2020-01-15T11:30:59.123Z
start
string <date-time>
Example: start=2020-01-15T11:30:59.123Z

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-0000-4000-a000-000000000002/events' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "cursor": "string"
}

Get event names

Get all event names divided by entity.

Authorizations:
zanshin_auth

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/events/names' \

Response samples

Content type
application/json
{
  • "alert": [
    ],
  • "follower": [
    ],
  • "following": [
    ],
  • "member": [
    ],
  • "organization": [
    ],
  • "answer": [
    ],
  • "assessment": [
    ],
  • "question": [
    ],
  • "questionnaire": [
    ],
  • "scan": [
    ],
  • "scanTarget": [
    ],
  • "webhook": [
    ]
}

Alerts

Manage alerts

Lists (yes, lists) alert

List all alerts that belong to an organization the requesting user is a member of.

Authorizations:
zanshin_auth
Request Body schema: application/json

Request body to filter alerts

organizationId
required
string (Organization ID)

Organization to filter the alerts (OrganizationId)

scanTargetIds
Array of strings (Scan Target ID)

Scan targets to filter alerts from (ScanTargetIds), not passing the field will fetch all

rules
Array of strings (Rules)

Rules to filter alerts. Not passing the field will fetch all.

states
Array of strings (Alert State)
Items Enum: "OPEN" "ACTIVE" "IN_PROGRESS" "RISK_ACCEPTED" "MITIGATING_CONTROL" "FALSE_POSITIVE" "CLOSED"

Alert states to filter, not passing the field will fetch all. Note: The ACTIVE state is the combination of the OPEN and IN_PROGRESS states.

severities
Array of strings (Violated Rule)
Items Enum: "CRITICAL" "HIGH" "MEDIUM" "LOW" "INFO"

Severity of the alert to filter, not passing the field will fetch all.

page
required
integer (page) >= 1

Page to be fetched, starts at 1

pageSize
required
integer (page size) >= 1

Size of the page to fetch

lang
string (lang)
Enum: "pt-BR" "en-US"

Language result should be in

openedAtStart
string <date-time> (Last Opened Date (starts at))

Search alerts by last opened date - greater or equals than

openedAtEnd
string <date-time> (Last opened Date (ends at))

Search alerts by last opened date - less or equals than

resolvedAtStart
string <date-time> (Last resolved Date (starts at))

Search alerts by last resolved date - greater or equals than

resolvedAtEnd
string <date-time> (Last resolved Date (ends at))

Search alerts by last resolved date - less or equals than

createdAtStart
string <date-time> (Creation Date (starts at))

Search alerts by creation date - greater or equals than

createdAtEnd
string <date-time> (Creation Date (ends at))

Search alerts by creation date - less or equals than

updatedAtStart
string <date-time> (Update Date (starts at))

Search alerts by update date - greater or equals than

updatedAtEnd
string <date-time> (Update Date (ends at))

Search alerts by update date - less or equals than

search
string (search)

String to search for

sort
string (sort)
Enum: "desc" "asc"

Sort order the results should be in

order
string (order)
Enum: "scanTargetId" "resource" "rule" "severity" "state" "createdAt" "updatedAt"

Field to use for ordering

Responses

Request samples

Content type
application/json
{
  • "organizationId": "e0000000-a000-a000-a000-000000000001",
  • "scanTargetIds": [
    ],
  • "rules": [
    ],
  • "states": [
    ],
  • "severities": [
    ],
  • "page": 2,
  • "pageSize": 25,
  • "lang": "en-US",
  • "openedAtStart": "2019-08-24T14:15:22Z",
  • "openedAtEnd": "2019-08-24T14:15:22Z",
  • "resolvedAtStart": "2019-08-24T14:15:22Z",
  • "resolvedAtEnd": "2019-08-24T14:15:22Z",
  • "createdAtStart": "2019-08-24T14:15:22Z",
  • "createdAtEnd": "2019-08-24T14:15:22Z",
  • "updatedAtStart": "2019-08-24T14:15:22Z",
  • "updatedAtEnd": "2019-08-24T14:15:22Z",
  • "search": "dns",
  • "sort": "desc",
  • "order": "rule"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "total": 1
}

Lists following alerts

List all alerts for organizations the user is following.

Alerts from Following Organization: Resources are redacted.

Alerts from your Organization: You can see everything.

Authorizations:
zanshin_auth
Request Body schema: application/json

Data to filter

organizationId
required
string (Organization ID)

Organization to filter the following alerts (OrganizationId)

followingIds
Array of strings (Following ids)

Organizations to filter following alerts (FollowingIds). All ids must belong to following organizations. Not passing the field will fetch all.

rules
Array of strings (Rules)

Rules to filter alerts from (rule), not passing the field will fetch all.

states
Array of strings (Alert State)
Items Enum: "OPEN" "ACTIVE" "IN_PROGRESS" "RISK_ACCEPTED" "MITIGATING_CONTROL" "FALSE_POSITIVE" "CLOSED"

Alert states to filter, not passing the field will fetch all. Note: The ACTIVE state is the combination of the OPEN and IN_PROGRESS states.

severities
Array of strings (Violated Rule)
Items Enum: "CRITICAL" "HIGH" "MEDIUM" "LOW" "INFO"

Severity of the alert to filter, not passing the field will fetch all

page
integer (page) >= 1

Page to be fetched, starts at 1

pageSize
integer (page size) >= 1

Size of the page to fetch

lang
string (lang)
Enum: "pt-BR" "en-US"

Language.

openedAtStart
string <date-time> (Last opened Date (starts at))

Search alerts by last opened date - greater or equals than

openedAtEnd
string <date-time> (Last opened Date (ends at))

Search alerts by last opened date - less or equals than

resolvedAtStart
string <date-time> (Last resolved Date (starts at))

Search alerts by last resolved date - greater or equals than

resolvedAtEnd
string <date-time> (Last resolved Date (ends at))

Search alerts by last resolved date - less or equals than

createdAtStart
string <date-time> (Creation Date (starts at))

Search alerts by creation date - greater or equals than

createdAtEnd
string <date-time> (Creation Date (ends at))

Search alerts by creation date - less or equals than

updatedAtStart
string <date-time> (Update Date (starts at))

Search alerts by update date - greater or equals than

updatedAtEnd
string <date-time> (Update Date (ends at))

Search alerts by update date - less or equals than

search
string (search)

String to search for

sort
string (sort)
Enum: "desc" "asc"

Sort order the results should be in

order
string (order)
Enum: "scanTargetId" "resource" "rule" "severity" "state" "createdAt" "updatedAt"

Field to use for ordering

Responses

Request samples

Content type
application/json
{
  • "organizationId": "e0000000-a000-a000-a000-000000000001",
  • "followingIds": [
    ],
  • "rules": [
    ],
  • "states": [
    ],
  • "severities": [
    ],
  • "page": 2,
  • "pageSize": 25,
  • "lang": "en-US",
  • "openedAtStart": "2019-08-24T14:15:22Z",
  • "openedAtEnd": "2019-08-24T14:15:22Z",
  • "resolvedAtStart": "2019-08-24T14:15:22Z",
  • "resolvedAtEnd": "2019-08-24T14:15:22Z",
  • "createdAtStart": "2019-08-24T14:15:22Z",
  • "createdAtEnd": "2019-08-24T14:15:22Z",
  • "updatedAtStart": "2019-08-24T14:15:22Z",
  • "updatedAtEnd": "2019-08-24T14:15:22Z",
  • "search": "dns",
  • "sort": "desc",
  • "order": "rule"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "total": 1
}

Lists alerts history

List all alerts history that belong to an organization the requesting user is a member of.

Authorizations:
zanshin_auth
Request Body schema: application/json

Request body to filter alerts history

organizationId
required
string (Organization ID)

Organization to filter the alerts (OrganizationId)

scanTargetIds
Array of strings (Scan Target ID)

Scan targets to filter alerts from (ScanTargetIds), not passing the field will fetch all

lang
string (lang)
Enum: "pt-BR" "en-US"

Language.

pageSize
required
integer (page size) >= 1

Size of the page to fetch

cursor
string (Cursor)

Alert Cursor of the last alert consumed, when this value is passed, subsequent alert histories will be returned.

Responses

Request samples

Content type
application/json
{
  • "organizationId": "e0000000-a000-a000-a000-000000000001",
  • "scanTargetIds": [
    ],
  • "lang": "pt-BR",
  • "pageSize": 25,
  • "cursor": "54123412"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "total": 1,
  • "cursor": "3dlkJ3Z1aAxKB0Q"
}

Lists alerts history following

List all alerts history following that belong to an organization the requesting user is a member of.

Authorizations:
zanshin_auth
Request Body schema: application/json

Request body to filter alerts history Following

organizationId
required
string (Organization ID)

Organization to filter the alerts (OrganizationId)

followingIds
Array of strings (Following ids)

Organizations to filter following alerts from (FollowingIds), all ids must belong to following organizations. not passing the field will fetch from all

lang
string (lang)
Enum: "pt-BR" "en-US"

Language.

pageSize
required
integer (page size) >= 1

Size of the page to fetch

cursor
string (Cursor)

Alert cursor marks a specific point within the alert list, so we can control where the list starts

Responses

Request samples

Content type
application/json
{
  • "organizationId": "e0000000-a000-a000-a000-000000000001",
  • "followingIds": [
    ],
  • "lang": "pt-BR",
  • "pageSize": 25,
  • "cursor": "54123412"
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "total": 1,
  • "cursor": "3dlkJ3Z1aAxKB0Q"
}

Lists grouped by rules

Lists all alerts grouped by rules.

Authorizations:
zanshin_auth
Request Body schema: application/json

Data to filter

organizationId
required
string (Organization ID)

Organization to filter the alerts (OrganizationId)

scanTargetIds
Array of strings (Scan Target ID)

Scan targets to filter alerts from (ScanTargetIds), not passing the field will fetch all

states
Array of strings (Alert State)
Items Enum: "OPEN" "ACTIVE" "IN_PROGRESS" "RISK_ACCEPTED" "MITIGATING_CONTROL" "FALSE_POSITIVE" "CLOSED"

Alert states to filter, not passing the field will fetch all. Note: The ACTIVE state is the combination of the OPEN and IN_PROGRESS states.

severities
Array of strings (Violated Rule)
Items Enum: "CRITICAL" "HIGH" "MEDIUM" "LOW" "INFO"

Severity of the alert to filter, not passing the field will fetch all

page
required
integer (page) >= 1

Page to be fetched, starts at 1

pageSize
required
integer (page size) >= 1

Size of the page to fetch

lang
string (lang)
Enum: "pt-BR" "en-US"

Language result should be in

search
string (search)

String to search for

sort
string (sort)
Enum: "desc" "asc"

Sort order the results should be in

order
string (order)
Enum: "rule" "count" "severity"

Field to use for ordering

createdAtStart
string <date-time> (Creation Date (starts at))

Search alerts by creation date - greater or equals than

createdAtEnd
string <date-time> (Creation Date (ends at))

Search alerts by creation date - less or equals than

updatedAtStart
string <date-time> (Update Date (starts at))

Search alerts by update date - greater or equals than

updatedAtEnd
string <date-time> (Update Date (ends at))

Search alerts by update date - less or equals than

Responses

Request samples

Content type
application/json
{
  • "organizationId": "e0000000-a000-a000-a000-000000000001",
  • "scanTargetIds": [
    ],
  • "states": [
    ],
  • "severities": [
    ],
  • "page": 2,
  • "pageSize": 25,
  • "lang": "en-US",
  • "search": "dns",
  • "sort": "desc",
  • "order": "rule",
  • "createdAtStart": "2019-08-24T14:15:22Z",
  • "createdAtEnd": "2019-08-24T14:15:22Z",
  • "updatedAtStart": "2019-08-24T14:15:22Z",
  • "updatedAtEnd": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
[
  • {
    }
]

Lists following grouped by rules

Lists all alerts grouped by rule from organizations that you follow, according to the data filters I want

Authorizations:
zanshin_auth
Request Body schema: application/json

Data to filter

organizationId
required
string (Organization ID)

Organization to filter the following alerts (OrganizationId)

followingIds
Array of strings (Following ids)

Organizations to filter following alerts from (FallowingIds), all ids must belong to following organizations. Not passing the field will fetch from all

states
Array of strings (Alert State)
Items Enum: "OPEN" "ACTIVE" "IN_PROGRESS" "RISK_ACCEPTED" "MITIGATING_CONTROL" "FALSE_POSITIVE" "CLOSED"

Alert states to filter, not passing the field will fetch all. Note: The ACTIVE state is the combination of the OPEN and IN_PROGRESS states.

severities
Array of strings (Violated Rule)
Items Enum: "CRITICAL" "HIGH" "MEDIUM" "LOW" "INFO"

Severity of the alert to filter, not passing the field will fetch all

page
required
integer (page) >= 1

Page to be fetched, starts at 1

pageSize
required
integer (page size) >= 1

Size of the page to fetch

lang
string (lang)
Enum: "pt-BR" "en-US"

Language result should be in

search
string (search)

String to search for

sort
string (sort)
Enum: "desc" "asc"

Sort order the results should be in

order
string (order)
Enum: "rule" "count" "severity"

Field to use for ordering

Responses

Request samples

Content type
application/json
{
  • "organizationId": "e0000000-a000-a000-a000-000000000001",
  • "followingIds": [
    ],
  • "states": [
    ],
  • "severities": [
    ],
  • "page": 2,
  • "pageSize": 25,
  • "lang": "en-US",
  • "search": "dns",
  • "sort": "desc",
  • "order": "rule"
}

Response samples

Content type
application/json
{
  • "rule": "AWS:ELB:elbNoInstances",
  • "timelinessThreshold": 30,
  • "severity": "HIGH",
  • "count": 10
}

Detail alert

Get detailed data on a specific alert given the alert and alert Ids. Requesting user must be a member or a follower of the organization. Data depth will vary depending on the requesting user relanshionship with the organization.

Authorizations:
zanshin_auth
path Parameters
alertId
required
string <uuid>

The ID of an alert

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/alerts/{alertId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
{
  • "id": "d0000000-0000-0000-0000-000000000000",
  • "version": 1,
  • "organizationId": "00000000-0000-4000-a000-000000000001",
  • "scanTargetId": "00000000-0000-4000-a000-000000000001",
  • "resource": "arn:aws:ec2:jp-higo-1:000000000001:instance/i-000a000b0001000d",
  • "rule": "S3 Bucket does not enforce object cryptography.",
  • "severity": "MEDIUM",
  • "tags": [
    ],
  • "compliances": [
    ],
  • "labels": [
    ],
  • "metadata": {
    },
  • "enrichment": {
    },
  • "state": "OPEN",
  • "timelinessThreshold": 30,
  • "openedAt": "2021-01-13T12:34:56.123Z",
  • "resolvedAt": "2021-01-13T12:34:56.123Z",
  • "createdAt": "2021-01-13T12:34:56.123Z",
  • "updatedAt": "2023-01-13T12:34:56.123Z"
}

List alert history

List all historical versions of one alert that belong to an organization the requesting user is a member of.

Authorizations:
zanshin_auth
path Parameters
alertId
required
string <uuid>

The ID of an alert

query Parameters
page
required
integer >= 1
pageSize
required
integer >= 1

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/alerts/{alertId}/history' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json' \

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "total": 1
}

List alert comments

List all comments of a specific alert that belongs to an organization the requesting user is a member of.

Authorizations:
zanshin_auth
path Parameters
alertId
required
string <uuid>

The ID of an alert

query Parameters
page
required
integer >= 1
size
required
integer >= 1

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/alerts/{alertId}/comments' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json' \

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "total": 1
}

Edits alert

Edits data on a specific alert given the organization ID, the scan target ID, and the alert ID. Alert must belong to the given organization and scan target. Requesting user must be a administrator of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string <uuid>

The ID of an organization

scanTargetId
required
string <uuid>

The ID of an a scan target

alertId
required
string <uuid>

The ID of an alert

Request Body schema: application/json

Request body to update alert

state
any
Enum: "OPEN" "ACTIVE" "IN_PROGRESS" "RISK_ACCEPTED" "MITIGATING_CONTROL" "CLOSED"
labels
Array of strings (Labels)

Labels associated with this alert.

comment
string (Comments)

Obligatory when changing state to RISK_ACCEPTED, FALSE_POSITIVE, or MITIGATING_CONTROL

Responses

Request samples

Content type
application/json
{
  • "state": "RISK_ACCEPTED",
  • "labels": [
    ],
  • "comment": "string"
}

Response samples

Content type
application/json
{
  • "id": "d0000000-0000-0000-0000-000000000000",
  • "version": 1,
  • "organizationId": "00000000-0000-4000-a000-000000000001",
  • "scanTargetId": "00000000-0000-4000-a000-000000000001",
  • "resource": "arn:aws:ec2:jp-higo-1:000000000001:instance/i-000a000b0001000d",
  • "rule": "AZURE:SecurityCenter:securityConfigMonitoring",
  • "severity": "MEDIUM",
  • "tags": [
    ],
  • "compliances": [
    ],
  • "labels": [
    ],
  • "metadata": {
    },
  • "enrichment": {
    },
  • "state": "OPEN",
  • "openedAt": "2021-01-13T12:34:56.123Z",
  • "resolvedAt": "2021-01-13T12:34:56.123Z",
  • "createdAt": "2021-01-13T12:34:56.123Z",
  • "updatedAt": "2023-01-13T12:34:56.123Z",
  • "ruleTitle": "S3 Bucket does not enforce object cryptography."
}

Create comment

Create a new comment for this alert.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string <uuid>

The ID of an organization

alertId
required
string <uuid>

The ID of an alert

Request Body schema: application/json

Create comment

comment
string (Comment)

Leave a comment in text/HTML

Responses

Request samples

Content type
application/json
{
  • "comment": "<p>Hello World!</>"
}

Response samples

Content type
application/json
true

Batch edit alerts

Edit a batch of alerts based on a set of filters and a list of IDs. All alerts that match the filters and the alerts that are on the IDs list will be updated, if you wish to use only one of those simply pass an empty array in one filter or and empty list on the IDs list. Requesting user must be a member of the organization.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string <uuid>

The ID of an organization

Request Body schema: application/json

Request body to batch update alerts

state
string (New State)
Enum: "OPEN" "IN_PROGRESS" "RISK_ACCEPTED" "MITIGATING_CONTROL" "FALSE_POSITIVE"

The state to change the alerts to

comment
string (Comment)

Sanitized text/HTML with comment, this field is mandatory if the state is RISK_ACCEPTED, MITIGATING_CONTROL or FALSE_POSITIVE

object (Condition)

Condition to use for selecting alerts to update, all fields are mandatory and combined with AND except for the selection field which is OR

Responses

Request samples

Content type
application/json
{
  • "state": "RISK_ACCEPTED",
  • "comment": "<p>I should not be accepting those risks</p>",
  • "condition": {
    }
}

Response samples

Content type
application/json
{
  • "count": 754,
  • "dryRun": true
}

Summaries

Utility ./endpoints for grouped data

Summarizes alerts

Returns summarized data for the scans pertinent to the user. If scanTargetIds is empty or null, all of the scan targets are included.

Authorizations:
zanshin_auth
Request Body schema: application/json

Data to filter

organizationId
required
string (Organization ID)

Organization to filter the summary (OrganizationId)

scanTargetIds
Array of strings (Scan Target ID)

Scan targets to filter summaries from (ScanTargetIds), not passing the field will fetch all

search
string (search)

String to search for

lang
string (lang)
Enum: "pt-BR" "en-US"

Language result should be in

Responses

Request samples

Content type
application/json
{
  • "organizationId": "e0000000-a000-a000-a000-000000000001",
  • "scanTargetIds": [
    ],
  • "search": "dns",
  • "lang": "en-US"
}

Response samples

Content type
application/json
{
  • "total": {
    },
  • "scanTargets": {
    }
}

Summarizes scan targets

Returns a summary of all the scan targets, with stats such as close alerts and more. The logged user must be a member of the given organization

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/{orgId}/summary/scantarget' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \

Response samples

Content type
application/json
[
  • {
    }
]

Summarizes followings

Returns a summary of all the followings, with stats such as close alerts, types of scan targets and more. The logged user must be a member of the given organization

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Request Body schema: application/json

Request body to filter following summaries

scanTargetKinds
string (Scan Target Kinds)
Enum: "AWS" "AZURE" "BITBUCKET" "DOMAIN" "GCP" "GITHUB" "GITLAB" "GWORKSPACE" "HUAWEI" "JIRA" "MS365" "ORACLE" "SALESFORCE" "SLACK"

Scan Target Kinds that the following has, not passing the field will fetch all.

alertSeverity
Array of strings (Alert Severities)
Items Enum: "CRITICAL" "HIGH" "MEDIUM" "LOW" "INFO"

Severity of the alerts to filter, not passing the field will fetch all.

status
string (Current status)
Enum: "ACTIVE" "SUSPENDED"

Only followings with the informed status will be fetched, not passing the field will fetch all.

search
string (Name Search)

Name to be search among the following name, not passing the field will fetch all.

tags
Array of strings (Tags)

Tags applied to the organizations that one follows to filter. Not passing the field will fetch the ones without tag

order
string (Order Field)

Field to sort the data, not passing the field will order by name.

sort
string (Sort Field)
Enum: "asc" "desc"

The data should be sorted ascending (asc) or descending (desc).

Responses

Request samples

Content type
application/json
{
  • "scanTargetKinds": [
    ],
  • "alertSeverity": [
    ],
  • "status": [
    ],
  • "search": "ACME",
  • "tags": [
    ],
  • "order": "name",
  • "sort": "asc"
}

Response samples

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

Summarizes following alerts

Summarizes following data on all relevant scans for the user. This data is grouped by followings and severity. Only followers can access.

Authorizations:
zanshin_auth
Request Body schema: application/json

Data to filter

organizationId
required
string (Organization ID)

Organization to filter the following alert summary (OrganizationId)

followingIds
Array of strings (Following ID)

Organization ids of following to filter (FollowingIds)

page
integer (page) >= 1

Page to be fetched, starts at 1

Responses

Request samples

Content type
application/json
{
  • "organizationId": "e0000000-a000-a000-a000-000000000001",
  • "followingIds": [
    ],
  • "page": 2
}

Response samples

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

Summarizes following alerts by scan target type

An endpoint to get summarized data on the scans relevant to the user, grouped by scan target type

Authorizations:
zanshin_auth
Request Body schema: application/json

Data to filter

organizationId
required
string (Organization ID)

Organization to filter the following alert summary (OrganizationId)

followingIds
Array of strings (Following ID)

Organization ids of following to filter (FollowingIds)

severities
Array of strings (Alert Severities)
Items Enum: "CRITICAL" "HIGH" "MEDIUM" "LOW" "INFO"

Severity of the alert to filter, not passing the field will fetch all.

sort
string (sort)
Enum: "desc" "asc"

Sort order the results should be in

order
string (order)
Enum: "kind" "percentResolved" "timeliness" "discovered" "remaining" "resolved" "organizationCount"

Field to use for ordering

page
required
integer (page) >= 1

Page to be fetched, starts at 1

pageSize
required
integer (page size) >= 1

Size of the page to fetch

Responses

Request samples

Content type
application/json
{
  • "organizationId": "e0000000-a000-a000-a000-000000000001",
  • "followingIds": [
    ],
  • "severities": [
    ],
  • "sort": "desc",
  • "order": "percentResolved",
  • "page": 2,
  • "pageSize": 1
}

Response samples

Content type
application/json
{
  • "kind": "AWS",
  • "percentResolved": 0.75,
  • "timeliness": 0.75,
  • "discovered": 200,
  • "remaining": 50,
  • "resolved": 150,
  • "organizationCount": 5
}

Summarizes following alerts by tag

An endpoint to get summarized data on the scans relevant to the user, grouped by tag

Authorizations:
zanshin_auth
Request Body schema: application/json

Data to filter

organizationId
required
string (Organization ID)

Organization to filter the following alert summary (OrganizationId)

followingIds
Array of strings (Following ID)

Organization ids of following to filter (FollowingIds)

severities
Array of strings (Alert Severities)
Items Enum: "CRITICAL" "HIGH" "MEDIUM" "LOW" "INFO"

Severity of the alert to filter, not passing the field will fetch all.

sort
string (sort)
Enum: "desc" "asc"

Sort order the results should be in

order
string (order)
Enum: "tag" "percentResolved" "timeliness" "discovered" "remaining" "resolved" "organizationCount"

Field to use for ordering

Responses

Request samples

Content type
application/json
{
  • "organizationId": "e0000000-a000-a000-a000-000000000001",
  • "followingIds": [
    ],
  • "severities": [
    ],
  • "sort": "desc",
  • "order": "percentResolved"
}

Response samples

Content type
application/json
{
  • "tag": "security",
  • "percentResolved": 0.75,
  • "timeliness": 0.75,
  • "discovered": 200,
  • "remaining": 50,
  • "resolved": 150,
  • "organizationCount": 5
}

Summarizes followings alerts over time.

An endpoint to get summarized data on the trend of resolved alerts by thhe followings over the specified dates.

Authorizations:
zanshin_auth
Request Body schema: application/json

Data to filter

organizationId
required
string (Organization ID)

Organization that the requester belongs to, data will be fetched from this organization followings

followingIds
Array of strings (Following ids)

Organizations to filter following alerts from (FollowingIds), all ids must belong to following organizations. not passing the field will fetch from all

severities
Array of strings (Severities)
Items Enum: "CRITICAL" "HIGH" "MEDIUM" "LOW" "INFO"

Severities of the alerts to filter, not passing the field will fetch all.

dates
Array of strings (Dates)

Dates to gather the data for (YYYY-MM-DD format), not passing the field will fetch the data for the current day. A maximum of 12 dates can be passed. Passing dates for which the system has no data will result in that item not being included in the response.

Responses

Request samples

Content type
application/json
{
  • "organizationId": "e0000000-a000-a000-a000-000000000001",
  • "followingIds": [
    ],
  • "severities": [
    ],
  • "dates": [
    ]
}

Response samples

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

Summarizes scans

Returns summarized data for the organizations. Only members of the organization can access. Followers don't see summarized data on the scans. Keys that do not exist in the request body will be ignored.

Authorizations:
zanshin_auth
Request Body schema: application/json

Data to filter

organizationId
required
string (Organization ID)

Organization to filter the summary (OrganizationId)

scanTargetIds
Array of strings (Scan Target ID)

Scan targets to filter summaries from (ScanTargetIds), not passing the field will fetch all

search
string (search)

String to search for

lang
string (lang)
Enum: "pt-BR" "en-US"

Language result should be in

Responses

Request samples

Content type
application/json
{
  • "organizationId": "e0000000-a000-a000-a000-000000000001",
  • "scanTargetIds": [
    ],
  • "search": "dns",
  • "lang": "en-US"
}

Response samples

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

Summarizes following scans

Returns summary data for the following organizations. Only members of the organization can access. Keys that do not exist in the request body will be ignored.

Authorizations:
zanshin_auth
Request Body schema: application/json

Data to filter

organizationId
required
string (Organization ID)

Organization to filter the summary (OrganizationId)

followingIds
Array of strings (Following ID)

Organization ids of following to filter (FollowingIds)

daysBefore
integer (Days Before)

How many days before the current day to fetch data from (default: 7)

Responses

Request samples

Content type
application/json
{
  • "organizationId": "e0000000-a000-a000-a000-000000000001",
  • "followingIds": [
    ],
  • "daysBefore": 5
}

Response samples

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

Document

Create document to export alerts

Create document to export alerts of organizations (one or more). Only CSV format. Only members or followers can access.

Authorizations:
zanshin_auth
Request Body schema: application/json
language
required
string (language)

User Language

service
required
string (service)

Document service

formats
required
Array of arrays (Email)

Document type. Only CSV format

required
object (Filter param)

Responses

Request samples

Content type
application/json
{
  • "language": "pt-BR",
  • "service": "following.alert.list",
  • "formats": [
    ],
  • "filterParam": {
    }
}

Response samples

Content type
application/json
{
  • "language": "pt-BR",
  • "service": "following.alert.list",
  • "formats": [
    ],
  • "filterParam": {
    },
  • "status": "PENDING",
  • "createdAt": "2023-01-13T12:34:56.123Z",
  • "expires": 1684093592.15,
  • "userId": "000086d0-0000-0000-0000-00000023ea00",
  • "id": "000086d0-0000-0000-0000-00000023ea00"
}

Deletes an generated document alerts

Deletes an generated document alerts. Only members or followers can access.

Authorizations:
zanshin_auth
path Parameters
documentId
required
string

Document Identifier

Responses

Request samples

curl -X 'DELETE' \
'https://api.zanshin.tenchisecurity.com/me/documents/{documentId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
true

Organization questionnaires

Create questionnaire

Create a new questionnaire for organization. Only members can create a questionnaire.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

Request Body schema: application/json

Questionnaire Name

name
string (name)

The questionnaire name

description
string (description)

The questionnaire description with markdown

Responses

Request samples

Content type
application/json
{
  • "name": "LGPD Questionnaire",
  • "description": "Was enacted to protect the fundamental rights of freedom and privacy, and the free formation of the personality of each individual"
}

Response samples

Content type
application/json
{
  • "id": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "organizationId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "version": 0,
  • "name": "LGPD Questionnaire",
  • "description": "Was enacted to protect the fundamental rights of freedom and privacy",
  • "status": "ACTIVE",
  • "createdAt": "2023-12-01T12:34:56.123Z",
  • "updatedAt": "2023-12-01T12:34:56.123Z"
}

Get all questionnaires for organization

Get all questionnaire for organization. Only organization members can get all questionnaires. Can be sorted by name, status, createdAt, updatedAt, version and filtered by status and name.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

query Parameters
order
string
Enum: "name" "status" "version" "createdAt" "updatedAt"
Example: order=version
sort
string
Enum: "asc" "desc"
Example: sort=asc
status
string
Enum: "ACTIVE" "INACTIVE"
Example: status=ACTIVE
name
string
Example: name=myQuestionnaire

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-ffff-4000-a000-000000000001/questionnaires' \
-H 'accept: */*' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json' \

Response samples

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

Get a specific questionnaire for organization

Get a specific questionnaire for organization. Only organization members can get all questionnaires.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

questionnaireId
required
string

Questionnaire unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-ffff-4000-a000-000000000001/questionnaires/f1b6afa7-0000-1111-2222-66e2faf6488e' \
-H 'accept: */*' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json' 

Response samples

Content type
application/json
{
  • "id": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "organizationId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "version": 0,
  • "name": "LGPD Questionnaire",
  • "description": "Was enacted to protect the fundamental rights of freedom and privacy",
  • "status": "ACTIVE",
  • "createdAt": "2023-12-01T12:34:56.123Z",
  • "updatedAt": "2023-12-01T12:34:56.123Z"
}

Update a specific questionnaire for organization

Update a specific questionnaire for organization. Only organization member should get all questionnaires.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

questionnaireId
required
string

Questionnaire unique identifier

Responses

Request samples

curl -X 'PUT' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-ffff-4000-a000-000000000001/questionnaires/f1b6afa7-0000-1111-2222-66e2faf6488e' \
-H 'accept: */*' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json' 
--data '{
          "name": "Questionário 2 UPDATE - Teste",
          "description": "### description markdown SUPER ADMIN UPDATE"
        }'

Response samples

Content type
application/json
{
  • "id": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "organizationId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "version": 0,
  • "name": "LGPD Questionnaire",
  • "description": "Was enacted to protect the fundamental rights of freedom and privacy",
  • "status": "ACTIVE",
  • "createdAt": "2023-12-01T12:34:56.123Z",
  • "updatedAt": "2023-12-01T12:34:56.123Z"
}

Publish questionnaire

Publish a new questionnaire for organization. Only organization admin members can create a questionnaire.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

questionnaireId
required
string

Questionnaire unique identifier

Responses

Request samples

curl -X 'POST' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-ffff-4000-a000-000000000001/questionnaires/00000000-ffff-4000-a000-000000000001/publish' \
-H 'accept: */*' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json' \

Response samples

Content type
application/json
{
  • "id": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "organizationId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "version": 0,
  • "name": "LGPD Questionnaire",
  • "description": "Was enacted to protect the fundamental rights of freedom and privacy",
  • "status": "ACTIVE",
  • "createdAt": "2023-12-01T12:34:56.123Z",
  • "updatedAt": "2023-12-01T12:34:56.123Z"
}

Send questionnaire

Send a new questionnaire for organization. Only organization admin members can create a questionnaire.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

questionnaireId
required
string

Questionnaire unique identifier

Responses

Request samples

curl -X 'POST' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-ffff-4000-a000-000000000001/questionnaires/00000000-ffff-4000-a000-000000000001/send' \
-H 'accept: */*' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json' \
-d '{
      "receiverIds": ["00000000-ffff-4000-a000-000000000005"]
      "dueDate": "2023-11-10T14:30:19.232Z"
    }'

Response samples

Content type
application/json
true

Get all questionnaire versions

Get all questionnaire versions. Only members can create a questionnaire.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

questionnaireId
required
string

Questionnaire unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-ffff-4000-a000-000000000001/questionnaires/00000000-ffff-4000-a000-000000000001/versions' \
-H 'accept: */*' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json' 

Response samples

Content type
application/json
{
  • "id": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "organizationId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "version": 0,
  • "name": "LGPD Questionnaire",
  • "description": "Was enacted to protect the fundamental rights of freedom and privacy",
  • "status": "ACTIVE",
  • "createdAt": "2023-12-01T12:34:56.123Z",
  • "updatedAt": "2023-12-01T12:34:56.123Z"
}

Get questionnaire version

Get a specific questionnaire version. Only members can create a questionnaire.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

questionnaireId
required
string

Questionnaire unique identifier

questionnaireVersion
required
number

Version unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-ffff-4000-a000-000000000001/questionnaires/00000000-ffff-4000-a000-000000000001/versions/1' \
-H 'accept: */*' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json'

Response samples

Content type
application/json
{
  • "id": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "organizationId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "version": 0,
  • "name": "LGPD Questionnaire",
  • "description": "Was enacted to protect the fundamental rights of freedom and privacy",
  • "status": "ACTIVE",
  • "createdAt": "2023-12-01T12:34:56.123Z",
  • "updatedAt": "2023-12-01T12:34:56.123Z"
}

Create questions

Create a new question for questionnaire. Only members can create a questionnaire.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

questionnaireId
required
string

Questionnaire unique identifier

Responses

Request samples

curl -X 'POST' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-ffff-4000-a000-000000000001/questionnaires/00000000-ffff-4000-a000-000000000001/questions' \
-H 'accept: */*' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json' \
-d '{
      "order": "1",
      "title": "Question 1",
      "description": "Description 1",
      "params": ["SINGLE_CHOICE"],
  }'

Response samples

Content type
application/json
{
  • "id": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "organizationId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "version": 0,
  • "name": "LGPD Questionnaire",
  • "description": "Was enacted to protect the fundamental rights of freedom and privacy",
  • "status": "ACTIVE",
  • "createdAt": "2023-12-01T12:34:56.123Z",
  • "updatedAt": "2023-12-01T12:34:56.123Z"
}

Get all questions

Only organization members can get all questions for questionnaire. Can be filtered by title, type and required.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

questionnaireId
required
string

Questionnaire unique identifier

query Parameters
title
string
Example: title=firstQuestion
type
string
Enum: "TEXT" "SINGLE_CHOICE" "MULTIPLE_CHOICE"
Example: type=TEXT
required
boolean
Example: required=true

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-ffff-4000-a000-000000000001/questionnaires/00000000-ffff-4000-a000-000000000001/questions' \
-H 'accept: */*' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json'

Response samples

Content type
application/json
{
  • "id": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "organizationId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "version": 0,
  • "name": "LGPD Questionnaire",
  • "description": "Was enacted to protect the fundamental rights of freedom and privacy",
  • "status": "ACTIVE",
  • "createdAt": "2023-12-01T12:34:56.123Z",
  • "updatedAt": "2023-12-01T12:34:56.123Z"
}

Get all assessments for organization

Get all assessments for organization. Only organization members can get all assessments. Sortable by questionnaire name, due date, date sent and status. Filterable by questionnaire name, receiver id, sender id, questionnaire id, due date, status.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

query Parameters
order
string
Enum: "status" "dueDate" "updatedAt" "name"
Example: order=status
sort
string
Enum: "asc" "desc"
Example: sort=asc
name
string
Example: name=myQuestionnaire
status
string
Enum: "NEW" "APPROVED" "REJECTED" "REQUESTED_REVIEW" "REQUESTED_CLARIFICATION" "REQUESTED_DEBATE"
Example: status=NEW
dueDateStart
string <date-time>
Example: dueDateStart=2020-01-15T11:30:59.123Z
dueDateEnd
string <date-time>
Example: dueDateEnd=2020-01-15T11:30:59.123Z
senderId
string <uuid>
Example: senderId=f12345ab-6cd9-ab88-999e-bbdd2266f1b2
receiverId
string <uuid>
Example: receiverId=f12345ab-6cd9-ab88-999e-bbdd2266f1b2
questionnaireId
string <uuid>
Example: questionnaireId=f12345ab-6cd9-ab88-999e-bbdd2266f1b2

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-ffff-4000-a000-000000000001/assessments' \
-H 'accept: */*' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json'

Response samples

Content type
application/json
{
  • "id": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "questionnaireId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "questionnaireVersion": 0,
  • "senderId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "receiverId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "name": "LGPD Questionnaire",
  • "description": "Was enacted to protect the fundamental rights of freedom and privacy",
  • "dueDate": "2023-12-01T12:34:56.123Z",
  • "firstRequestedReviewAt": "2023-12-01T11:11:11.123Z",
  • "status": "NEW",
  • "createdAt": "2023-12-01T12:34:56.123Z",
  • "updatedAt": "2023-12-01T12:34:56.123Z"
}

Get all assessments for organization

Get all assessments for organization. Only organization members can get all assessments.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

assessmentId
required
string

Assessment unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-ffff-4000-a000-000000000001/assessments/00000000-ffff-4000-a000-000000000001' \
-H 'accept: */*' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json' 

Response samples

Content type
application/json
{
  • "id": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "questionnaireId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "questionnaireVersion": 0,
  • "senderId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "receiverId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "name": "LGPD Questionnaire",
  • "description": "Was enacted to protect the fundamental rights of freedom and privacy",
  • "dueDate": "2023-12-01T12:34:56.123Z",
  • "firstRequestedReviewAt": "2023-12-01T11:11:11.123Z",
  • "status": "NEW",
  • "createdAt": "2023-12-01T12:34:56.123Z",
  • "updatedAt": "2023-12-01T12:34:56.123Z"
}

Get questions by id

Create a new question for questionnaire. Only organization members can create a question.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

questionnaireId
required
string

Questionnaire unique identifier

questionId
required
string

Question unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-ffff-4000-a000-000000000001/questionnaires/00000000-ffff-4000-a000-000000000001/questions/00000007-ffff-4000-a000-000000000007' \
-H 'accept: */*' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json' \

Response samples

Content type
application/json
{
  • "id": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "organizationId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "version": 0,
  • "name": "LGPD Questionnaire",
  • "description": "Was enacted to protect the fundamental rights of freedom and privacy",
  • "status": "ACTIVE",
  • "createdAt": "2023-12-01T12:34:56.123Z",
  • "updatedAt": "2023-12-01T12:34:56.123Z"
}

Update questions

Update question for questionnaire. Only organization members can create questions.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

questionnaireId
required
string

Questionnaire unique identifier

questionId
required
string

Question unique identifier

Responses

Request samples

curl -X 'PUT' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-ffff-4000-a000-000000000001/questionnaires/00000000-ffff-4000-a000-000000000001/questions' \
-H 'accept: */*' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json' \
-d '{
      "order": "1",
      "title": "Question 1",
      "description": "Description 1",
      "params": ["SINGLE_CHOICE"],
  }'

Response samples

Content type
application/json
{
  • "id": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2"
}

Get all schedules for questionnaire

Get all schedules for a questionnaire given both the organization and questionnaire Ids.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

questionnaireId
required
string

Questionnaire unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-ffff-4000-a000-000000000001/questionnaires/f1b6afa7-0000-1111-2222-66e2faf6488e/schedules' \
-H 'accept: */*' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json'

Response samples

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

Create a questionnaire schedule

Create a new schedule for the questionnaire.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

questionnaireId
required
string

Questionnaire unique identifier

Request Body schema: application/json
name
string (Name)

Questionnaire schedule name

frequency
string (Schedule)
Enum: "MONTHLY" "QUARTERLY" "YEARLY"

Questionnaire schedule

dueDays
number (Due days)

Questionnaire schedule due days

receiverTags
Array of strings (Receiver tags)

Questionnaire schedule receiver tags

Responses

Request samples

Content type
application/json
{
  • "name": "Daily questionnaire schedule",
  • "frequency": "MONTHLY",
  • "dueDays": 5,
  • "receiverTags": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "058d35d5-1e41-4ff9-8768-c76aa7009fed",
  • "questionnaireId": "53c4706f-55c8-4f91-81ee-3fb773fc219b",
  • "organizationId": "00000000-0000-4000-a000-000000000001",
  • "name": "Daily questionnaire schedule",
  • "frequency": "MONTHLY",
  • "dueDays": 5,
  • "receiverTags": [
    ],
  • "createdAt": "2021-01-01T12:34:56.123Z",
  • "updatedAt": "2022-01-15T12:34:56.123Z"
}

Get a specific questionnaire schedule

Get a specific questionnaire schedule given the organization, questionnaire and questionnaire schedule Ids.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

questionnaireId
required
string

Questionnaire unique identifier

questionnaireScheduleId
required
string

Questionnaire Schedule unique identifier

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-ffff-4000-a000-000000000001/questionnaires/f1b6afa7-0000-1111-2222-66e2faf6488e/schedules/d95d5785-335e-472a-bd30-0b6c9164c49b' \
-H 'accept: */*' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json'

Response samples

Content type
application/json
{
  • "id": "058d35d5-1e41-4ff9-8768-c76aa7009fed",
  • "questionnaireId": "53c4706f-55c8-4f91-81ee-3fb773fc219b",
  • "organizationId": "00000000-0000-4000-a000-000000000001",
  • "name": "Daily questionnaire schedule",
  • "frequency": "MONTHLY",
  • "dueDays": 5,
  • "receiverTags": [
    ],
  • "createdAt": "2021-01-01T12:34:56.123Z",
  • "updatedAt": "2022-01-15T12:34:56.123Z"
}

Update a questionnaire schedule

Update a questionnaire schedule.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

questionnaireId
required
string

Questionnaire unique identifier

questionnaireScheduleId
required
string

Questionnaire Schedule unique identifier

Request Body schema: application/json
name
string (Name)

Questionnaire schedule name

frequency
string (Schedule)
Enum: "MONTHLY" "QUARTERLY" "YEARLY"

Questionnaire schedule

dueDays
number (Due days)

Questionnaire schedule due days

receiverTags
Array of strings (Receiver tags)

Questionnaire schedule receiver tags

Responses

Request samples

Content type
application/json
{
  • "name": "Daily questionnaire schedule",
  • "frequency": "MONTHLY",
  • "dueDays": 5,
  • "receiverTags": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "058d35d5-1e41-4ff9-8768-c76aa7009fed",
  • "questionnaireId": "53c4706f-55c8-4f91-81ee-3fb773fc219b",
  • "organizationId": "00000000-0000-4000-a000-000000000001",
  • "name": "Daily questionnaire schedule",
  • "frequency": "MONTHLY",
  • "dueDays": 5,
  • "receiverTags": [
    ],
  • "createdAt": "2021-01-01T12:34:56.123Z",
  • "updatedAt": "2022-01-15T12:34:56.123Z"
}

Remove a questionnaire schedule

Remove a questionnaire schedule given the organization, questionnaire and questionnaire schedule Ids.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

questionnaireId
required
string

Questionnaire unique identifier

questionnaireScheduleId
required
string

Questionnaire Schedule unique identifier

Responses

Request samples

curl -X 'DELETE' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-ffff-4000-a000-000000000001/questionnaires/f1b6afa7-0000-1111-2222-66e2faf6488e/schedules/d95d5785-335e-472a-bd30-0b6c9164c49b' \
-H 'accept: */*' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \

Response samples

Content type
application/json
true

Update questionnaire status

Updates the status for the questionnaire.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

questionnaireId
required
string

Questionnaire unique identifier

Request Body schema: application/json
status
required
string (Status)
Enum: "ACTIVE" "INACTIVE"

Questionnaire Status

Responses

Request samples

Content type
application/json
{
  • "status": "ACTIVE"
}

Response samples

Content type
application/json
{
  • "id": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "organizationId": "f12345ab-6cd9-ab88-999e-bbdd2266f1b2",
  • "version": 0,
  • "name": "LGPD Questionnaire",
  • "description": "Was enacted to protect the fundamental rights of freedom and privacy",
  • "status": "ACTIVE",
  • "createdAt": "2023-12-01T12:34:56.123Z",
  • "updatedAt": "2023-12-01T12:34:56.123Z"
}

Get questions and answers for an assessment.

Get questions and answers for an assessment. Can be sorted by answer status and filtered by answer status and question title.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

assessmentId
required
string

Assessment unique identifier

query Parameters
order
string
Value: "status"
Example: order=status
sort
string
Enum: "asc" "desc"
Example: sort=asc
title
string
Example: title=myQuestion
status
string
Enum: "NEW" "APPROVED" "REJECTED" "REQUESTED_REVIEW" "REQUESTED_DEBATE" "REQUESTED_CLARIFICATION"
Example: status=NEW

Responses

Request samples

curl -X 'GET' \
'https://api.zanshin.tenchisecurity.com/organizations/00000000-ffff-4000-a000-000000000001/assessments/00000000-ffff-4000-a000-000000000001/questions' \
-H 'accept: */*' \
-H 'Authorization: Bearer {AUTH_TOKEN}' \
-H 'Content-Type: application/json'

Response samples

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

Update Following

Update following

Update for the following.

Authorizations:
zanshin_auth
path Parameters
organizationId
required
string

Organization unique identifier

followingId
required
string

A following organization unique identifier

Responses

Request samples

curl -X 'PUT' \
'https://api.zanshin.tenchisecurity.com/organizations/{organizationId}/following/{followingId}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {AUTH_TOKEN}'

Response samples

Content type
application/json
{}