Get an agency
curl --request GET \
--url https://api.stage.origin.one/api/v2/agencies/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.stage.origin.one/api/v2/agencies/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stage.origin.one/api/v2/agencies/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"code": "FAA",
"id": "3",
"object": "agency",
"name": "Federal Aviation Administration (FAA)",
"jobCategories": [
{
"id": "3987402f-e963-45a9-8799-b9ea6621adae",
"name": "Flight Crewmember",
"object": "jobCategory",
"url": "/api/v2/agencies/3/jobCategories/3987402f-e963-45a9-8799-b9ea6621adae"
}
],
"url": "/api/v2/agencies/3"
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}Agencies
Get an agency
Returns an agency with the job categories it publishes. Requires the agency.read scope.
GET
/
api
/
v2
/
agencies
/
{id}
Get an agency
curl --request GET \
--url https://api.stage.origin.one/api/v2/agencies/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.stage.origin.one/api/v2/agencies/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stage.origin.one/api/v2/agencies/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"code": "FAA",
"id": "3",
"object": "agency",
"name": "Federal Aviation Administration (FAA)",
"jobCategories": [
{
"id": "3987402f-e963-45a9-8799-b9ea6621adae",
"name": "Flight Crewmember",
"object": "jobCategory",
"url": "/api/v2/agencies/3/jobCategories/3987402f-e963-45a9-8799-b9ea6621adae"
}
],
"url": "/api/v2/agencies/3"
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}{
"error": "Bad Request",
"errors": [
{
"code": "tooSmall",
"detail": "Too small: expected number to be >=1",
"meta": {},
"source": {
"pointer": "/page"
}
}
],
"statusCode": 400
}Authorizations
Origin One API token. Pass it in the Authorization header: Authorization: Bearer <token>.
Path Parameters
Unique identifier of the resource.
Example:
"123"
Response
Success.
Agency code, as regulations name it.
Example:
"FAA"
Unique identifier of the agency.
Example:
"3"
Object type; always agency.
Available options:
agency Example:
"agency"
Agency name.
Example:
"Federal Aviation Administration (FAA)"
Job categories the agency publishes, by name. An order names one when the agency has a choice.
Show child attributes
Show child attributes
Canonical path of this resource, relative to the API origin.
Example:
"/api/v2/agencies/3"