...
This API provides functionalities to manage people, projects, organizational hierarchy, and their relationships. Providing this data via these APIs can be useful for providing filters for Insights dashboards. You can create
, read
, and list
data for each resource. Feel free to explore each endpoint section for further details.
Remember to authenticate generate an Opsera API token before accessing any of these endpoints. This API token must be included with all API calls as an Authorization header in the following format:
Code Block |
---|
Authorization: {opsera_api_token} |
People
The People endpoint manages data about the users involved in your projects. Use these functions to create new people records, retrieve all people records, or access specific person details.
...
URL | METHOD | DESCRIPTION | Scope | REQUEST | RESPONSE |
---|
/api/v2/data/project
| POST | Creates a new record representing a project that is associated with any users. Note |
---|
Required Fields: projectedprojectId, projectName |
externalId: Id for relating this person back to the original data source.organization would represent the highest entities while team would represent the lowest level. assets: A project can represent 1 or more repositories and/or services | API Access
| Code Block |
---|
| {
"projectId": "2322345",
"projectName": "Phase 2",
"projectOwner": {
"firstName": "John",
"lastName": "Doe",
"email": "jd@opsera.io"
}
"externalId": "25ce97e1-549b-4f31-bd01-80490847f8a6",
"organization": "Opsera",
"business": "Engineering",
"department": "Platform",
"group": "Phase 2",
"team": "AOD"
"assets": [
"repositories": [{
name: "web-portal",
platform: "github.com",
url: "https://github.com/Opsera/web-portal.git",
}],
"services": [{
name: "ha-proxy",
identifier: "haprox01",
dependencies: {},
externalId: "b558c4d4-1eba-45e8-92bb-b255df6abd87",
}]
]
} |
| |
/api/v2/data/projects
| GET | Lists all project records for which you have access. | API Access
| | Code Block |
---|
| {
"count": 1,
"data": [{
"projectId": "2322345",
"projectName": "Phase 2",
"projectOwner": {
"firstName": "John",
"lastName": "Doe",
"email": "jd@opsera.io"
}
"externalId": "25ce97e1-549b-4f31-bd01-80490847f8a6",
"organization": "Opsera",
"business": "Engineering",
"department": "Platform",
"group": "Phase 2",
"team": "AOD"
"assets": [
"repositories": [{
name: "web-portal",
platform: "github.com",
url: "https://github.com/Opsera/web-portal.git",
}],
"services": [{
name: "ha-proxy",
identifier: "haprox01",
dependencies: {},
externalId: "b558c4d4-1eba-45e8-92bb-b255df6abd87",
}]
]
}]
} |
|
/api/v2/data/project/{projectId}
| GET | Gets the project record associated with the given email address. | API Access
| | Code Block |
---|
| {
"projectId": "2322345",
"projectName": "Phase 2",
"projectOwner": {
"firstName": "John",
"lastName": "Doe",
"email": "jd@opsera.io"
}
"externalId": "25ce97e1-549b-4f31-bd01-80490847f8a6",
"organization": "Opsera",
"business": "Engineering",
"department": "Platform",
"group": "Phase 2",
"team": "AOD"
"assets": [
"repositories": [{
name: "web-portal",
platform: "github.com",
url: "https://github.com/Opsera/web-portal.git",
}],
"services": [{
name: "ha-proxy",
identifier: "haprox01",
dependencies: {},
externalId: "b558c4d4-1eba-45e8-92bb-b255df6abd87",
}]
]
} |
|
...
URL | METHOD | DESCRIPTION | Scope | REQUEST | RESPONSE |
---|
/api/v2/data/org-hierarchy
| POST | Creates an organizational hierarchy mapping record representing the organizations, businesses, departments, groups, and/or teams hierarchy. This is a convenience endpoint that creates a /mapping record where mappingType = "parent-child" and relationship = "org-hierarchy" Note |
---|
Required Fields: parent, child. Representing the parent and child organization/business/department/group/team.organization would represent the highest entities while team would represent the lowest level.
|
| API Access
| Code Block |
---|
| {
"parent": "Opsera", // organization
"parentType": "root"
"child": "R&D", // business
"childType": "Department"
} |
| |