openapi: 3.0.0 info: title: CoreData API v2 description: CoreData API for client applications. version: '0.1' contact: name: CoreData url: 'https://coredata.is' email: coredata@coredata.is servers: - description: Current server url: 'https://mmg.coredata.is/api/v2' paths: /contacts: get: summary: Return a list of contacts. operationId: get-contacts parameters: - name: limit $ref: '#/components/parameters/limit' - name: offset $ref: '#/components/parameters/offset' - name: title in: query required: false description: Contact title to match. schema: type: string - name: created in: query required: false description: Contact creation timestamp to match. schema: type: string format: date-time responses: '200': $ref: '#/components/responses/ContactsPage' '401': $ref: '#/components/responses/UnauthorizedError' post: summary: Create a new contact. operationId: post-contact requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateContactProperties' responses: '201': description: Created. headers: Location: $ref: '#/components/headers/Location' '401': $ref: '#/components/responses/UnauthorizedError' /projects: get: summary: Return a list of projects. operationId: get-projects parameters: - name: limit $ref: '#/components/parameters/limit' - name: offset $ref: '#/components/parameters/offset' - name: title required: false description: Contact title to match. schema: type: string in: query - name: created in: query required: false description: Contact creation timestamp to match. schema: type: string format: date-time responses: '200': $ref: '#/components/responses/ProjectsPage' '401': $ref: '#/components/responses/UnauthorizedError' post: summary: Create a new project. operationId: post-project requestBody: content: application/json: schema: allOf: - $ref: '#/components/schemas/CreateProjectProperties' - $ref: '#/components/schemas/ProjectRequiredProperties' responses: '201': description: Created. headers: Location: $ref: '#/components/headers/Location' '401': $ref: '#/components/responses/UnauthorizedError' /files: get: summary: Return a list of files. operationId: get-files parameters: - name: limit $ref: '#/components/parameters/limit' - name: offset $ref: '#/components/parameters/offset' responses: '200': $ref: '#/components/responses/FilesPage' '401': $ref: '#/components/responses/UnauthorizedError' post: summary: Create a new file. operationId: post-file requestBody: content: multipart/form-data: schema: type: object allOf: - $ref: '#/components/schemas/CreateFileProperties' - $ref: '#/components/schemas/FileRequiredProperties' - type: object properties: content: type: string format: binary responses: '201': description: Created. headers: Location: $ref: '#/components/headers/Location' '401': $ref: '#/components/responses/UnauthorizedError' components: parameters: limit: name: limit in: query required: false description: Specify the number of elements to display per page. schema: type: integer minimum: 1 default: 20 offset: name: offset in: query required: false description: Specify the offset to start displaying element on a page. schema: type: integer minimum: 0 default: 0 schemas: id: type: string x-stoplight: id: obj0yw58np38g format: uuid ObjectWithId: type: object properties: id: $ref: '#/components/schemas/id' Dynatype: type: object properties: id: $ref: '#/components/schemas/id' title: type: string Space: type: object properties: id: $ref: '#/components/schemas/id' title: type: string Organization: type: object properties: id: $ref: '#/components/schemas/id' title: type: string Tags: type: array items: type: string Email: x-stoplight: id: bm0ykljyimc53 type: object properties: email: type: string label: type: string description: >- List of supported email labels is predefined in CoreData, and can be extended in the future. enum: - 'email_label:Work:' - 'email_label:Private:' Emails: type: array items: $ref: '#/components/schemas/Email' Address: type: object properties: city: type: string code: type: string description: Postal code. country: $ref: '#/components/schemas/Country' state: type: string street: type: string Country: type: string description: >- List of supported countries is predefined in CoreData, and can be extended in the future. enum: - 'country:Zimbabwe:africa' - 'country:Zambia:africa' - 'country:Yemen:asia' - 'country:Western_Sahara:africa' - 'country:Wallis_and_Futuna_Islands:oceania' - 'country:Viet_Nam:asia' - 'country:Venezuela:south-america' - 'country:Vanuatu:oceania' - 'country:Uzbekistan:asia' - 'country:Uruguay:south-america' - 'country:United_States_of_America:north-america' - 'country:United_States_Minor_Outlying_Islands:oceania' - 'country:United_Kingdom_of_Great_Britain_N_Ireland:europe' - 'country:United_Arab_Emirates:asia' - 'country:Ukraine:europe' - 'country:Uganda:africa' - 'country:US_Virgin_Islands:north-america' - 'country:Tuvalu:oceania' - 'country:Turks_and_Caicos_Islands:north-america' - 'country:Turkmenistan:asia' - 'country:Turkey:asia' - 'country:Tunisia:africa' - 'country:Trinidad_and_Tobago:north-america' - 'country:Tonga:oceania' - 'country:Tokelau_Tokelau_Islands:oceania' - 'country:Togo:africa' - 'country:Timor_Leste:asia' - 'country:Thailand:asia' - 'country:Tanzania:africa' - 'country:Tajikistan:asia' - 'country:Taiwan:asia' - 'country:Syrian_Arab_Republic:asia' - 'country:Switzerland:europe' - 'country:Sweden:europe' - 'country:Swaziland:africa' - 'country:Svalbard_Jan_Mayen_Islands:europe' - 'country:Suriname:south-america' - 'country:Sudan:africa' - 'country:Sri_Lanka:asia' - 'country:Spain:europe' - 'country:South_Georgia_and_the_South_Sandwich_Islands:antarctica' - 'country:South_Africa:africa' - 'country:Somalia:africa' - 'country:Solomon_Islands:oceania' - 'country:Slovenia:europe' - 'country:Slovakia_Slovak_Republic:europe' - 'country:Singapore:asia' - 'country:Sierra_Leone:africa' - 'country:Seychelles:africa' - 'country:Serbia:europe' - 'country:Senegal:africa' - 'country:Saudi_Arabia:asia' - 'country:Sao_Tome_and_Principe:africa' - 'country:San_Marino:europe' - 'country:Samoa:oceania' - 'country:St_Vincent_and_the_Grenadines:north-america' - 'country:St_Pierre_and_Miquelon:north-america' - 'country:St_Lucia:north-america' - 'country:St_Kitts_and_Nevis:north-america' - 'country:St_Helena:africa' - 'country:Rwanda:africa' - 'country:Russian_Federation:europe' - 'country:Romania:europe' - 'country:Reunion:africa' - 'country:Qatar:asia' - 'country:Puerto_Rico:north-america' - 'country:Portugal:europe' - 'country:Poland:europe' - 'country:Pitcairn_Island:oceania' - 'country:Philippines:asia' - 'country:Peru:south-america' - 'country:Paraguay:south-america' - 'country:Papua_New_Guinea:oceania' - 'country:Panama:north-america' - 'country:Palestinian_Territory:asia' - 'country:Palau:oceania' - 'country:Pakistan:asia' - 'country:Oman:asia' - 'country:Norway:europe' - 'country:Northern_Mariana_Islands:oceania' - 'country:Norfolk_Island:oceania' - 'country:Niue:oceania' - 'country:Nigeria:africa' - 'country:Niger:africa' - 'country:Nicaragua:north-america' - 'country:New_Zealand:oceania' - 'country:New_Caledonia:oceania' - 'country:Netherlands:europe' - 'country:Netherlands_Antilles:north-america' - 'country:Nepal:asia' - 'country:Nauru:oceania' - 'country:Namibia:africa' - 'country:Myanmar:asia' - 'country:Mozambique:africa' - 'country:Morocco:africa' - 'country:Montserrat:north-america' - 'country:Montenegro:europe' - 'country:Mongolia:asia' - 'country:Monaco:europe' - 'country:Moldova:europe' - 'country:Micronesia:oceania' - 'country:Mexico:north-america' - 'country:Mayotte:africa' - 'country:Mauritius:africa' - 'country:Mauritania:africa' - 'country:Martinique:north-america' - 'country:Marshall_Islands:oceania' - 'country:Malta:europe' - 'country:Mali:africa' - 'country:Maldives:asia' - 'country:Malaysia:asia' - 'country:Malawi:africa' - 'country:Madagascar:africa' - 'country:Macedonia:europe' - 'country:Macao:asia' - 'country:Luxembourg:europe' - 'country:Lithuania:europe' - 'country:Liechtenstein:europe' - 'country:Libyan_Arab_Jamahiriya:africa' - 'country:Liberia:africa' - 'country:Lesotho:africa' - 'country:Lebanon:asia' - 'country:Latvia:europe' - 'country:Lao_People_s_Democratic_Republic:asia' - 'country:Kyrgyz_Republic:asia' - 'country:Kuwait:asia' - 'country:South_Korea:asia' - 'country:North_Korea:asia' - 'country:Kiribati:oceania' - 'country:Kenya:africa' - 'country:Kazakhstan:asia' - 'country:Jordan:asia' - 'country:Jersey:europe' - 'country:Japan:asia' - 'country:Jamaica:north-america' - 'country:Italy:europe' - 'country:Israel:asia' - 'country:Isle_of_Man:europe' - 'country:Ireland:europe' - 'country:Iraq:asia' - 'country:Iran:asia' - 'country:Indonesia:asia' - 'country:India:asia' - 'country:Iceland:europe' - 'country:Hungary:europe' - 'country:Hong_Kong:asia' - 'country:Honduras:north-america' - 'country:Holy_See_Vatican_City_State:europe' - 'country:Heard_and_McDonald_Islands:antarctica' - 'country:Haiti:north-america' - 'country:Guyana:south-america' - 'country:Guinea_Bissau:africa' - 'country:Guinea:africa' - 'country:Guernsey:europe' - 'country:Guatemala:north-america' - 'country:Guam:oceania' - 'country:Guadaloupe:north-america' - 'country:Grenada:north-america' - 'country:Greenland:north-america' - 'country:Greece:europe' - 'country:Gibraltar:europe' - 'country:Ghana:africa' - 'country:Germany:europe' - 'country:Georgia:asia' - 'country:Gambia:africa' - 'country:Gabon:africa' - 'country:French_Southern_Territories:antarctica' - 'country:French_Polynesia:oceania' - 'country:French_Guiana:south-america' - 'country:France:europe' - 'country:Finland:europe' - 'country:Fiji:oceania' - 'country:Falkland_Islands_Malvinas:south-america' - 'country:Faroe_Islands:europe' - 'country:Ethiopia:africa' - 'country:Estonia:europe' - 'country:Eritrea:africa' - 'country:Equatorial_Guinea:africa' - 'country:El_Salvador:north-america' - 'country:Egypt:africa' - 'country:Ecuador:south-america' - 'country:Dominican_Republic:north-america' - 'country:Dominica:north-america' - 'country:Djibouti:africa' - 'country:Denmark:europe' - 'country:Czech_Republic:europe' - 'country:Cyprus:asia' - 'country:Cuba:north-america' - 'country:Croatia:europe' - 'country:Cote_D_Ivoire:africa' - 'country:Costa_Rica:north-america' - 'country:Cook_Islands:oceania' - 'country:Congo_Democratic_Republic:africa' - 'country:Congo_Republic:africa' - 'country:Comoros:africa' - 'country:Colombia:south-america' - 'country:Cocos_Keeling_Islands:asia' - 'country:Christmas_Island:asia' - 'country:China:asia' - 'country:Chile:south-america' - 'country:Chad:africa' - 'country:Central_African_Republic:africa' - 'country:Cayman_Islands:north-america' - 'country:Cape_Verde:africa' - 'country:Canada:north-america' - 'country:Cameroon:africa' - 'country:Cambodia:asia' - 'country:Burundi:africa' - 'country:Burkina_Faso:africa' - 'country:Bulgaria:europe' - 'country:Brunei_Darussalam:asia' - 'country:British_Virgin_Islands:north-america' - 'country:British_Indian_Ocean_Territory_Chagos_Archipelago:asia' - 'country:Brazil:south-america' - 'country:Bouvet_Island_Bouvetoya:antarctica' - 'country:Botswana:africa' - 'country:Bosnia_and_Herzegovina:europe' - 'country:Bolivia:south-america' - 'country:Bhutan:asia' - 'country:Bermuda:north-america' - 'country:Benin:africa' - 'country:Belize:north-america' - 'country:Belgium:europe' - 'country:Belarus:europe' - 'country:Barbados:north-america' - 'country:Bangladesh:asia' - 'country:Bahrain:asia' - 'country:Bahamas:north-america' - 'country:Azerbaijan:asia' - 'country:Austria:europe' - 'country:Australia:oceania' - 'country:Aruba:north-america' - 'country:Armenia:asia' - 'country:Argentina:south-america' - 'country:Antigua_and_Barbuda:north-america' - 'country:Antarctica_the_territory_South_of_60_deg_S:antarctica' - 'country:Anguilla:north-america' - 'country:Angola:africa' - 'country:Andorra:europe' - 'country:American_Samoa:oceania' - 'country:Algeria:africa' - 'country:Albania:europe' - 'country:Aland_Islands:europe' - 'country:Afghanistan:asia' Addresses: type: array items: $ref: '#/components/schemas/Address' Phone: type: object properties: number: type: string label: type: string description: >- List of supported phone labels is predefined in CoreData, and can be extended in the future. enum: - 'phone_label:Work:' - 'phone_label:Home:' - 'phone_label:Mobile:' - 'phone_label:Fax:' Phones: type: array items: $ref: '#/components/schemas/Phone' PageMeta: type: object properties: limit: type: integer minimum: 1 default: 20 next: type: string offset: type: integer minimum: 0 default: 0 previous: type: string total_count: type: integer minimum: 0 Contact: type: object allOf: - $ref: '#/components/schemas/ObjectWithId' - $ref: '#/components/schemas/ContactBaseProperties' - $ref: '#/components/schemas/ContactRequiredProperties' properties: dynatype: $ref: '#/components/schemas/Dynatype' ContactBaseProperties: type: object x-stoplight: id: yv14yci3rqphc properties: title: type: string description: type: string status: type: string role: type: string tags: $ref: '#/components/schemas/Tags' contact_addresses: $ref: '#/components/schemas/Addresses' contact_groups: type: array items: type: string emails: $ref: '#/components/schemas/Emails' phones: $ref: '#/components/schemas/Phones' identifier: type: string organization: $ref: '#/components/schemas/Organization' template: type: string ContactRequiredProperties: type: object required: - title CreateContactProperties: type: object allOf: - $ref: '#/components/schemas/ContactBaseProperties' - $ref: '#/components/schemas/ContactRequiredProperties' properties: dynatype: type: object properties: title: type: string ProjectReference: type: object properties: identifier: type: string title: type: string allOf: - $ref: '#/components/schemas/ObjectWithId' Project: type: object allOf: - $ref: '#/components/schemas/ObjectWithId' - $ref: '#/components/schemas/ProjectBaseProperties' - $ref: '#/components/schemas/ProjectRequiredProperties' properties: space: $ref: '#/components/schemas/Space' dynatype: $ref: '#/components/schemas/Dynatype' ProjectBaseProperties: type: object x-stoplight: id: xg4340vqx0fy2 properties: title: type: string description: type: string due_date: type: string format: date-time status: $ref: '#/components/schemas/ProjectStatus' status_message: type: string role: type: string identifier: type: string tags: $ref: '#/components/schemas/Tags' template: type: string contacts: type: array description: Array of project contact IDs. items: $ref: '#/components/schemas/id' ProjectRequiredProperties: type: object required: - title - space CreateProjectProperties: type: object allOf: - $ref: '#/components/schemas/ProjectBaseProperties' - $ref: '#/components/schemas/ProjectRequiredProperties' properties: space: $ref: '#/components/schemas/id' dynatype: type: object properties: title: type: string ProjectStatus: type: string description: >- Project status, the list of values may be extended with CoreData extensions. enum: - 'project_status:In_progress:' - 'project_status:Pending:' - 'project_status:On_hold:' - 'project_status:Closed:' File: type: object allOf: - $ref: '#/components/schemas/ObjectWithId' - $ref: '#/components/schemas/FileBaseProperties' - $ref: '#/components/schemas/FileRequiredProperties' properties: dynatype: $ref: '#/components/schemas/Dynatype' project: $ref: '#/components/schemas/ProjectReference' space: $ref: '#/components/schemas/Space' readOnly: true mime_type: type: string format: mimetype readOnly: true blob_name: type: string readOnly: true size: type: integer readOnly: true digest: type: string readOnly: true created: type: string format: date-time readOnly: true FileBaseProperties: type: object x-stoplight: id: vr62f5dspskq5 properties: title: type: string description: type: string type: type: string description: Title of the file's dynatype. filename: type: string tags: $ref: '#/components/schemas/Tags' FileRequiredProperties: type: object required: - title - filename - project CreateFileProperties: type: object x-stoplight: id: fjlm4vp3jxbwh allOf: - $ref: '#/components/schemas/FileBaseProperties' - $ref: '#/components/schemas/FileRequiredProperties' properties: propject: $ref: '#/components/schemas/id' dynatype: type: string responses: ContactsPage: description: Page of contacts resultset. content: application/json: schema: type: object properties: meta: $ref: '#/components/schemas/PageMeta' objects: type: array items: $ref: '#/components/schemas/Contact' ProjectsPage: description: Page of projects resultset. content: application/json: schema: type: object properties: meta: $ref: '#/components/schemas/PageMeta' objects: type: array items: $ref: '#/components/schemas/Project' FilesPage: description: Page of files resultset. content: application/json: schema: type: object properties: meta: $ref: '#/components/schemas/PageMeta' objects: type: array items: $ref: '#/components/schemas/File' UnauthorizedError: description: Authentication information is missing or invalid. headers: WWW_Authenticate: schema: type: string headers: Location: description: 'URL path for the created resource, contains the object ID.' schema: type: string example: /api/v2/contacts/f8ae12ba-ea8e-11ed-8f2e-ebd320d00493/ securitySchemes: basicAuth: type: http scheme: basic apiKeyAuth: type: apiKey in: header name: AUTHORIZATION security: - basicAuth: [] - apiKeyAuth: []