Golden Recursion Schema API API
The Schema API API from Golden Recursion — 4 operation(s) for schema api.
The Schema API API from Golden Recursion — 4 operation(s) for schema api.
openapi: 3.1.0
info:
title: Golden API v2 Entity API Schema API API
version: '2.0'
servers:
- url: https://golden.com/
description: Golden Public API V2
tags:
- name: Schema API
paths:
/api/v2/public/schema/entityTypes/:
get:
operationId: public_api_schema_entityTypes_list
summary: Get entity types schema
parameters:
- name: cursor
required: false
in: query
description: The pagination cursor value.
schema:
type: string
- name: pageSize
required: false
in: query
description: "Number of results to return per page.\n The default value is 100 and the maximum 100."
schema:
type: integer
tags:
- Schema API
security:
- ApiKeyAuth: []
responses:
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/PublicApiSchemaEntityTypesListErrorResponse400'
description: ''
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse403'
examples:
PermissionDenied:
value:
type: client_error
errors:
- code: permission_denied
detail: You do not have permission to perform this action.
attr: null
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse404'
examples:
NotFound:
value:
type: client_error
errors:
- code: not_found
detail: Not found.
attr: null
description: ''
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse429'
examples:
Throttled:
value:
type: client_error
errors:
- code: throttled
detail: Request was throttled.
attr: null
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse500'
examples:
APIException:
value:
type: server_error
errors:
- code: error
detail: A server error occurred.
attr: null
description: ''
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedPublicAPIEntityTypeList'
description: ''
/api/v2/public/schema/entityTypes/{id}/:
get:
operationId: public_api_schema_entityTypes_retrieve
summary: Get entity type schema by entity type id
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this entity type.
required: true
examples:
CompanyEntityType:
value: 6
summary: Company Entity Type
tags:
- Schema API
security:
- ApiKeyAuth: []
responses:
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/PublicApiSchemaEntityTypesRetrieveErrorResponse400'
description: ''
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse403'
examples:
PermissionDenied:
value:
type: client_error
errors:
- code: permission_denied
detail: You do not have permission to perform this action.
attr: null
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse404'
examples:
NotFound:
value:
type: client_error
errors:
- code: not_found
detail: Not found.
attr: null
description: ''
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse429'
examples:
Throttled:
value:
type: client_error
errors:
- code: throttled
detail: Request was throttled.
attr: null
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse500'
examples:
APIException:
value:
type: server_error
errors:
- code: error
detail: A server error occurred.
attr: null
description: ''
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PublicAPIEntityType'
description: ''
/api/v2/public/schema/predicates/:
get:
operationId: public_api_schema_predicates_list
summary: Get predicates schema
parameters:
- name: cursor
required: false
in: query
description: The pagination cursor value.
schema:
type: string
- name: pageSize
required: false
in: query
description: "Number of results to return per page.\n The default value is 100 and the maximum 100."
schema:
type: integer
tags:
- Schema API
security:
- ApiKeyAuth: []
responses:
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/PublicApiSchemaPredicatesListErrorResponse400'
description: ''
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse403'
examples:
PermissionDenied:
value:
type: client_error
errors:
- code: permission_denied
detail: You do not have permission to perform this action.
attr: null
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse404'
examples:
NotFound:
value:
type: client_error
errors:
- code: not_found
detail: Not found.
attr: null
description: ''
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse429'
examples:
Throttled:
value:
type: client_error
errors:
- code: throttled
detail: Request was throttled.
attr: null
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse500'
examples:
APIException:
value:
type: server_error
errors:
- code: error
detail: A server error occurred.
attr: null
description: ''
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedPublicAPIPredicateList'
description: ''
/api/v2/public/schema/predicates/{id}/:
get:
operationId: public_api_schema_predicates_retrieve
summary: Get predicate schema by predicate id
parameters:
- in: path
name: id
schema:
type: string
description: A unique string value identifying this predicate.
required: true
examples:
Website:
value: website
tags:
- Schema API
security:
- ApiKeyAuth: []
responses:
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/PublicApiSchemaPredicatesRetrieveErrorResponse400'
description: ''
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse403'
examples:
PermissionDenied:
value:
type: client_error
errors:
- code: permission_denied
detail: You do not have permission to perform this action.
attr: null
description: ''
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse404'
examples:
NotFound:
value:
type: client_error
errors:
- code: not_found
detail: Not found.
attr: null
description: ''
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse429'
examples:
Throttled:
value:
type: client_error
errors:
- code: throttled
detail: Request was throttled.
attr: null
description: ''
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse500'
examples:
APIException:
value:
type: server_error
errors:
- code: error
detail: A server error occurred.
attr: null
description: ''
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PublicAPIPredicate'
description: ''
components:
schemas:
Error429CodeEnum:
enum:
- throttled
type: string
description: '* `throttled` - Throttled'
Error404:
type: object
properties:
code:
$ref: '#/components/schemas/Error404CodeEnum'
detail:
type: string
attr:
type: string
nullable: true
required:
- attr
- code
- detail
Error403CodeEnum:
enum:
- permission_denied
type: string
description: '* `permission_denied` - Permission Denied'
PublicAPIEntityPropertyInstance:
type: object
properties:
value:
allOf:
- $ref: '#/components/schemas/PublicAPIEntityPropertyValue'
description: 'Property Instance Value. The format depends on the predicate type.
See the description for each option.'
citations:
type: array
items:
$ref: '#/components/schemas/PublicAPICitation'
description: Arrays of citations
required:
- citations
- value
PaginatedPublicAPIPredicateList:
type: object
properties:
next:
type: string
nullable: true
format: uri
description: URL of next page
previous:
type: string
nullable: true
format: uri
description: URL of previous page
results:
type: array
items:
$ref: '#/components/schemas/PublicAPIPredicate'
Error500CodeEnum:
enum:
- error
type: string
description: '* `error` - Error'
Error403:
type: object
properties:
code:
$ref: '#/components/schemas/Error403CodeEnum'
detail:
type: string
attr:
type: string
nullable: true
required:
- attr
- code
- detail
ErrorResponse429:
type: object
properties:
type:
$ref: '#/components/schemas/Type5d3Enum'
errors:
type: array
items:
$ref: '#/components/schemas/Error429'
required:
- errors
- type
ErrorResponse500TypeEnum:
enum:
- server_error
type: string
description: '* `server_error` - Server Error'
ErrorResponse500:
type: object
properties:
type:
$ref: '#/components/schemas/ErrorResponse500TypeEnum'
errors:
type: array
items:
$ref: '#/components/schemas/Error500'
required:
- errors
- type
PublicAPIPredicate:
type: object
properties:
id:
type: string
description: Predicate ID
name:
type: string
description: Predicate Name
description:
type: string
description: Predicate Description
type:
type: string
readOnly: true
description: Can be int, intrange, float, text, url, entity and location
objectChoices:
type: array
items:
$ref: '#/components/schemas/PublicAPIPredicateObjectChoice'
readOnly: true
description: If set, it defines the value choice set.
objectEntityTypes:
type: array
items:
$ref: '#/components/schemas/PublicAPIEntityReference'
readOnly: true
description: For predicates of type entity, this field defines the allowed entity types.
objectJsonPredicates:
type: array
items:
$ref: '#/components/schemas/PublicAPIPredicateReference'
readOnly: true
description: 'For predicates of type json, this defines the associated subpredicates.
The object value will be an object where each key is a subpredicate ID and each value is the associated subpredicate value.'
isFilterable:
type: boolean
description: Can be used to filter entities with filterPredicateId query string param
required:
- description
- isFilterable
- objectChoices
- objectEntityTypes
- objectJsonPredicates
- type
PublicApiSchemaPredicatesRetrieveErrorResponse400:
oneOf:
- $ref: '#/components/schemas/ParseErrorResponse'
discriminator:
propertyName: type
mapping:
client_error: '#/components/schemas/ParseErrorResponse'
PaginatedPublicAPIEntityTypeList:
type: object
properties:
next:
type: string
nullable: true
format: uri
description: URL of next page
previous:
type: string
nullable: true
format: uri
description: URL of previous page
results:
type: array
items:
$ref: '#/components/schemas/PublicAPIEntityType'
PublicAPIPredicateReference:
type: object
properties:
id:
type: string
description: Predicate ID
required:
- id
PublicAPICitation:
type: object
properties:
title:
type: string
description: Citation Title
url:
type: string
description: Citation URL value
required:
- title
- url
PublicAPIEntityType:
type: object
properties:
id:
type: integer
readOnly: true
latestVersionId:
type: integer
description: ID of latest entity version
properties:
type: array
items:
$ref: '#/components/schemas/PublicAPIEntityProperty'
readOnly: true
description: Array of properties
predicates:
type: array
items:
$ref: '#/components/schemas/PublicAPIPredicateReference'
description: Predicates associated with the entity type
required:
- id
- latestVersionId
- predicates
- properties
Error404CodeEnum:
enum:
- not_found
type: string
description: '* `not_found` - Not Found'
ErrorResponse403:
type: object
properties:
type:
$ref: '#/components/schemas/Type5d3Enum'
errors:
type: array
items:
$ref: '#/components/schemas/Error403'
required:
- errors
- type
Type5d3Enum:
enum:
- client_error
type: string
description: '* `client_error` - Client Error'
ParseError:
type: object
properties:
code:
$ref: '#/components/schemas/ParseErrorCodeEnum'
detail:
type: string
attr:
type: string
nullable: true
required:
- attr
- code
- detail
PublicApiSchemaEntityTypesRetrieveErrorResponse400:
oneOf:
- $ref: '#/components/schemas/ParseErrorResponse'
discriminator:
propertyName: type
mapping:
client_error: '#/components/schemas/ParseErrorResponse'
PublicAPIEntityProperty:
type: object
properties:
predicateId:
type: string
description: Property Predicate ID
instances:
type: array
items:
$ref: '#/components/schemas/PublicAPIEntityPropertyInstance'
description: Array of Property Instances
required:
- instances
- predicateId
ErrorResponse404:
type: object
properties:
type:
$ref: '#/components/schemas/Type5d3Enum'
errors:
type: array
items:
$ref: '#/components/schemas/Error404'
required:
- errors
- type
ParseErrorCodeEnum:
enum:
- parse_error
type: string
description: '* `parse_error` - Parse Error'
PublicAPIEntityReference:
type: object
properties:
id:
type: integer
readOnly: true
properties:
type: array
items:
$ref: '#/components/schemas/PublicAPIEntityProperty'
readOnly: true
description: Array of properties. Since this is a reference, it only includes the name property.
required:
- id
- properties
ParseErrorResponse:
type: object
properties:
type:
$ref: '#/components/schemas/Type5d3Enum'
errors:
type: array
items:
$ref: '#/components/schemas/ParseError'
required:
- errors
- type
PublicAPIPredicateObjectChoice:
type: object
properties:
value:
allOf:
- $ref: '#/components/schemas/PublicAPIEntityPropertyValue'
description: 'Object choice value. The format depends on the predicate type.
See the description for each option.'
required:
- value
Error429:
type: object
properties:
code:
$ref: '#/components/schemas/Error429CodeEnum'
detail:
type: string
attr:
type: string
nullable: true
required:
- attr
- code
- detail
PublicApiSchemaPredicatesListErrorResponse400:
oneOf:
- $ref: '#/components/schemas/ParseErrorResponse'
discriminator:
propertyName: type
mapping:
client_error: '#/components/schemas/ParseErrorResponse'
Error500:
type: object
properties:
code:
$ref: '#/components/schemas/Error500CodeEnum'
detail:
type: string
attr:
type: string
nullable: true
required:
- attr
- code
- detail
PublicAPIEntityPropertyValue:
oneOf:
- type: integer
description: Integer value. Used for int type.
- type: number
description: Number value. Used for float predicate types.
- type: string
description: 'String value. Used for text, url and date predicate types.
For date type, the value is ISO-8601 formatted (YYYY-MM-DD, YYYY-MM, or YYYY).'
- type: object
properties:
id:
type: integer
description: Entity ID
properties:
type: array
items:
type: object
description: Array of properties. Same format as the root properties. Since this is a reference, it only includes the name property.
description: Entity reference object. Used for entity and location types.
required:
- id
- properties
- type: object
properties:
gte:
type: integer
description: Range start numeric value (inclusive)
lte:
type: integer
description: Range end numeric value (inclusive)
description: Integer Range Value
required:
- gte
- lte
- type: object
description: 'JSON object value. Used for json predicate type.
For json type, the schema is predicate specific. See predicate schema resource for details.'
PublicApiSchemaEntityTypesListErrorResponse400:
oneOf:
- $ref: '#/components/schemas/ParseErrorResponse'
discriminator:
propertyName: type
mapping:
client_error: '#/components/schemas/ParseErrorResponse'
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: apikey