Create a Corpus.
A Corpus consists of one or more Sources, where each Source defines a set of rules for crawling and indexing Documents.
Request Body required
- Array [
- ]
- Array [
- Array [
- ]
- ]
- Array [
- ]
- Array [
- Array [
- ]
- ]
corpus object
A queryable collection of documents. A corpus can be used to ground an LLM with factual content for a particular domain.
owner object
The the owner of this corpus.
user object
Represents a single Fixie User.
The email address for this user.
The name of the user. This is only used for display purposes.
The URL of the avatar image for this user.
The user's API token. This is only populated when a user accesses their own account information.
subscriptions object[]
The subscriptions for this user.
team object
Represents a Fixie Team.
The display name for this team.
The description for this team.
The URL of the avatar image for this team.
members object[]
The members of this Team.
user object
The user that is a member of this Team.
The email address for this user.
The name of the user. This is only used for display purposes.
The URL of the avatar image for this user.
The user's API token. This is only populated when a user accesses their own account information.
subscriptions object[]
The subscriptions for this user.
role object
The user's role on the Team.
True if the user is an admin for the team.
subscriptions object[]
The subscriptions for this team.
The human-readable name for this corpus.
stats object
The current stats for this corpus.
This field should not be populated in client requests.
A human-readable description of this corpus.
jobCallbacks object[]
Callbacks to execute when jobs reach particular states.
Possible values: [JOB_STATE_UNSPECIFIED
, JOB_STATE_PENDING
, JOB_STATE_RUNNING
, JOB_STATE_COMPLETED
, JOB_STATE_FAILED
, JOB_STATE_CANCELLED
]
The callback will be triggered when a Job enters one of these states.
webhook object
A Webhook callback. When a job reaches the specified state, a POST request will be sent to the specified URL. The WebhookBody can be serialized as JSON or Protobuf depending on the Content-Type header and will be filtered based on the provided FieldMask. Also see fixie_api.corpus.v1.WebhookBody.
The URL to POST to.
headers object
The HTTP headers to send. Include a Content-Type header to explicitly choose how the Job is serialized. If no Content-Type is provided, we'll use JSON (and add the appropriate application/json header).
A FieldMask to apply to the body before serializing it. If not provided, all fields will be included.
If set, the callback will only be attempted once even if the request fails. Otherwise failures will be retried a few times with backoff between them.
email object
An email callback. When a job reaches the specified state, an email will be sent to the specified recipients.
to object[] required
Possible values: [CORPUS_STATUS_UNSPECIFIED
, CORPUS_STATUS_EMPTY
, CORPUS_STATUS_INITIALIZING
, CORPUS_STATUS_READY
, CORPUS_STATUS_UPDATING
]
The callback will only be sent if the corpus is in one of these states at the trigger time.
rateLimit object
Callbacks will be sent no more frequently than this limit. (They may be triggered more frequently, but won't be sent until quota is available again. Only sent callbacks count against the quota. They also only count once regardless of whether they end up being retried.)
The number of events allowed per duration.
Possible values: Value must match regular expression ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
The duration over which the events are allowed. This defines a rolling window.
If specified, the corpus will be created in the specified team. Otherwise, the corpus will be owned by the user making the request.
- 200
- default
OK
Schema
- Array [
- ]
- Array [
- Array [
- ]
- ]
- Array [
- ]
- Array [
- Array [
- ]
- ]
corpus object
A queryable collection of documents. A corpus can be used to ground an LLM with factual content for a particular domain.
The unique ID of this corpus.
This field should not be populated in client requests.
owner object
The the owner of this corpus.
user object
Represents a single Fixie User.
The unique user ID for this user.
This field should not be populated in client requests.
The email address for this user.
The name of the user. This is only used for display purposes.
The URL of the avatar image for this user.
When this user was created.
This field should not be populated in client requests.
When this user was last modified.
This field should not be populated in client requests.
The user's API token. This is only populated when a user accesses their own account information.
When this user last logged in.
This field should not be populated in client requests.
subscriptions object[]
The subscriptions for this user.
The unique ID for this subscription.
Possible values: [SUBSCRIPTION_TYPE_UNSPECIFIED
, SUBSCRIPTION_TYPE_BUILDER
, SUBSCRIPTION_TYPE_STARTER
, SUBSCRIPTION_TYPE_PERFORMANCE
, SUBSCRIPTION_TYPE_OTHER
]
The type of subscription this represents.
Possible values: [SUBSCRIPTION_STATE_UNSPECIFIED
, SUBSCRIPTION_STATE_ACTIVE
, SUBSCRIPTION_STATE_CANCELED
, SUBSCRIPTION_STATE_EXPIRED
, SUBSCRIPTION_STATE_CANCEL_PENDING
]
The state of this subscription.
A description of this subscription.
When this subscription was created. This may not represent when the subscription was active, due to backdating.
When this subscription was last modified.
The timestamp when this subscription starts.
The timestamp when this subscription ends. If this subscription is active and has not been canceled, it will renew at this time.
team object
Represents a Fixie Team.
The unique ID for this team.
This field should not be populated in client requests.
The display name for this team.
The description for this team.
The URL of the avatar image for this team.
members object[]
The members of this Team.
The team ID.
user object
The user that is a member of this Team.
The unique user ID for this user.
This field should not be populated in client requests.
The email address for this user.
The name of the user. This is only used for display purposes.
The URL of the avatar image for this user.
When this user was created.
This field should not be populated in client requests.
When this user was last modified.
This field should not be populated in client requests.
The user's API token. This is only populated when a user accesses their own account information.
When this user last logged in.
This field should not be populated in client requests.
subscriptions object[]
The subscriptions for this user.
The unique ID for this subscription.
Possible values: [SUBSCRIPTION_TYPE_UNSPECIFIED
, SUBSCRIPTION_TYPE_BUILDER
, SUBSCRIPTION_TYPE_STARTER
, SUBSCRIPTION_TYPE_PERFORMANCE
, SUBSCRIPTION_TYPE_OTHER
]
The type of subscription this represents.
Possible values: [SUBSCRIPTION_STATE_UNSPECIFIED
, SUBSCRIPTION_STATE_ACTIVE
, SUBSCRIPTION_STATE_CANCELED
, SUBSCRIPTION_STATE_EXPIRED
, SUBSCRIPTION_STATE_CANCEL_PENDING
]
The state of this subscription.
A description of this subscription.
When this subscription was created. This may not represent when the subscription was active, due to backdating.
When this subscription was last modified.
The timestamp when this subscription starts.
The timestamp when this subscription ends. If this subscription is active and has not been canceled, it will renew at this time.
role object
The user's role on the Team.
True if the user is an admin for the team.
Whether the membership is pending acceptance of an invitation by the user.
When this membership was created.
When this membership was last modified.
When this team was created.
This field should not be populated in client requests.
When this team was last modified.
This field should not be populated in client requests.
subscriptions object[]
The subscriptions for this team.
The unique ID for this subscription.
Possible values: [SUBSCRIPTION_TYPE_UNSPECIFIED
, SUBSCRIPTION_TYPE_BUILDER
, SUBSCRIPTION_TYPE_STARTER
, SUBSCRIPTION_TYPE_PERFORMANCE
, SUBSCRIPTION_TYPE_OTHER
]
The type of subscription this represents.
Possible values: [SUBSCRIPTION_STATE_UNSPECIFIED
, SUBSCRIPTION_STATE_ACTIVE
, SUBSCRIPTION_STATE_CANCELED
, SUBSCRIPTION_STATE_EXPIRED
, SUBSCRIPTION_STATE_CANCEL_PENDING
]
The state of this subscription.
A description of this subscription.
When this subscription was created. This may not represent when the subscription was active, due to backdating.
When this subscription was last modified.
The timestamp when this subscription starts.
The timestamp when this subscription ends. If this subscription is active and has not been canceled, it will renew at this time.
The human-readable name for this corpus.
When this corpus was created.
This field should not be populated in client requests.
When this corpus was last modified.
This field should not be populated in client requests.
stats object
The current stats for this corpus.
This field should not be populated in client requests.
Possible values: [CORPUS_STATUS_UNSPECIFIED
, CORPUS_STATUS_EMPTY
, CORPUS_STATUS_INITIALIZING
, CORPUS_STATUS_READY
, CORPUS_STATUS_UPDATING
]
The current status of this corpus, indicating whether it is queriable.
The last time a job completed for any source in this corpus.
The total number of chunks in this corpus. Chunks are subsets of documents sized to respect context window limitations of LLMs.
The total number of documents in this corpus.
The total number of vectors in this corpus. Vectors are used for semantic search. Multiple vectors may correspond to a single chunk.
A human-readable description of this corpus.
Whether this corpus is public. A public corpus can be queried by any user or agent. (These are generally used only for examples. End users may not create public corpora.)
jobCallbacks object[]
Callbacks to execute when jobs reach particular states.
Possible values: [JOB_STATE_UNSPECIFIED
, JOB_STATE_PENDING
, JOB_STATE_RUNNING
, JOB_STATE_COMPLETED
, JOB_STATE_FAILED
, JOB_STATE_CANCELLED
]
The callback will be triggered when a Job enters one of these states.
webhook object
A Webhook callback. When a job reaches the specified state, a POST request will be sent to the specified URL. The WebhookBody can be serialized as JSON or Protobuf depending on the Content-Type header and will be filtered based on the provided FieldMask. Also see fixie_api.corpus.v1.WebhookBody.
The URL to POST to.
headers object
The HTTP headers to send. Include a Content-Type header to explicitly choose how the Job is serialized. If no Content-Type is provided, we'll use JSON (and add the appropriate application/json header).
A FieldMask to apply to the body before serializing it. If not provided, all fields will be included.
If set, the callback will only be attempted once even if the request fails. Otherwise failures will be retried a few times with backoff between them.
email object
An email callback. When a job reaches the specified state, an email will be sent to the specified recipients.
to object[] required
Possible values: [CORPUS_STATUS_UNSPECIFIED
, CORPUS_STATUS_EMPTY
, CORPUS_STATUS_INITIALIZING
, CORPUS_STATUS_READY
, CORPUS_STATUS_UPDATING
]
The callback will only be sent if the corpus is in one of these states at the trigger time.
rateLimit object
Callbacks will be sent no more frequently than this limit. (They may be triggered more frequently, but won't be sent until quota is available again. Only sent callbacks count against the quota. They also only count once regardless of whether they end up being retried.)
The number of events allowed per duration.
Possible values: Value must match regular expression ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
The duration over which the events are allowed. This defines a rolling window.
{
"corpus": {
"corpusId": "string",
"owner": {
"user": {
"userId": "string",
"email": "string",
"fullName": "string",
"avatarUrl": "string",
"created": "2024-03-07T22:56:08.178Z",
"modified": "2024-03-07T22:56:08.178Z",
"apiToken": "string",
"lastLogin": "2024-03-07T22:56:08.178Z",
"subscriptions": [
{
"id": "string",
"type": "SUBSCRIPTION_TYPE_UNSPECIFIED",
"state": "SUBSCRIPTION_STATE_UNSPECIFIED",
"description": "string",
"created": "2024-03-07T22:56:08.178Z",
"modified": "2024-03-07T22:56:08.178Z",
"startTime": "2024-03-07T22:56:08.179Z",
"endTime": "2024-03-07T22:56:08.179Z"
}
]
},
"team": {
"teamId": "string",
"displayName": "string",
"description": "string",
"avatarUrl": "string",
"members": [
{
"teamId": "string",
"user": {
"userId": "string",
"email": "string",
"fullName": "string",
"avatarUrl": "string",
"created": "2024-03-07T22:56:08.179Z",
"modified": "2024-03-07T22:56:08.179Z",
"apiToken": "string",
"lastLogin": "2024-03-07T22:56:08.179Z",
"subscriptions": [
{
"id": "string",
"type": "SUBSCRIPTION_TYPE_UNSPECIFIED",
"state": "SUBSCRIPTION_STATE_UNSPECIFIED",
"description": "string",
"created": "2024-03-07T22:56:08.179Z",
"modified": "2024-03-07T22:56:08.179Z",
"startTime": "2024-03-07T22:56:08.179Z",
"endTime": "2024-03-07T22:56:08.179Z"
}
]
},
"role": {
"isAdmin": true
},
"pending": true,
"created": "2024-03-07T22:56:08.179Z",
"modified": "2024-03-07T22:56:08.179Z"
}
],
"created": "2024-03-07T22:56:08.179Z",
"modified": "2024-03-07T22:56:08.179Z",
"subscriptions": [
{
"id": "string",
"type": "SUBSCRIPTION_TYPE_UNSPECIFIED",
"state": "SUBSCRIPTION_STATE_UNSPECIFIED",
"description": "string",
"created": "2024-03-07T22:56:08.179Z",
"modified": "2024-03-07T22:56:08.179Z",
"startTime": "2024-03-07T22:56:08.179Z",
"endTime": "2024-03-07T22:56:08.179Z"
}
]
}
},
"displayName": "string",
"created": "2024-03-07T22:56:08.179Z",
"modified": "2024-03-07T22:56:08.179Z",
"stats": {
"status": "CORPUS_STATUS_UNSPECIFIED",
"lastUpdated": "2024-03-07T22:56:08.179Z",
"numChunks": "string",
"numDocs": "string",
"numVectors": "string"
},
"description": "string",
"public": true,
"jobCallbacks": [
{
"stateFilter": [
"JOB_STATE_UNSPECIFIED"
],
"webhook": {
"url": "string",
"headers": {},
"bodyFieldMask": "string",
"doNotRetry": true
},
"email": {
"to": [
{
"name": "string",
"email": "string"
}
]
},
"corpusStatusFilter": [
"CORPUS_STATUS_UNSPECIFIED"
],
"rateLimit": {
"numRequests": 0,
"window": "string"
}
}
]
}
}
Default error response
Schema
- Array [
- ]
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
details object[]
A list of messages that carry the error details. There is a common set of message types for APIs to use.
The type of the serialized message.
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}