Get indexes of a collection

This will throw if the collection cannot be fetched from the server

@throws Exception

@param mixed $collectionId - collection id as a string or number

@return array $data - the indexes result-set from the server
439599
public function getIndexes($collectionId)
    {
        $urlParams = [self::OPTION_COLLECTION => $collectionId];
        $url       = UrlHelper::appendParamsUrl(Urls::URL_INDEX, $urlParams);
        $response  = $this->getConnection()->get($url);

        return $response->getJson();
    }
691959
public function getCollectionId($collection)
    {
        if ($collection instanceof Collection) {
            $collectionId = $collection->getId();

            return $collectionId;
        }

        $collectionId = $collection;

        return $collectionId;
    }
949930
public function getCollectorMessages($collectorId, array $filters = [])
	{
		return $this->sendRequest(
			$this->createRequest('GET', sprintf('collectors/%s/messages', $collectorId), [
				'query' => $filters
			])
		);
	}
452195
public static function indexName($project, $database, $collectionId, $indexId)
    {
        return self::getIndexNameTemplate()->render([
            'project' => $project,
            'database' => $database,
            'collection_id' => $collectionId,
            'index_id' => $indexId,
        ]);
    }
30784
final protected function getCollection($id, $default = null)
    {
        if ($id instanceof CollectionInterface) {
            return $id;
        }

        if (is_numeric($id)) {
            return $this->collectionManager->find($id);
        }

        if ($default instanceof CollectionInterface) {
            return $default;
        }

        return null;
    }
692548
public function indexOfId($id)
    {
        $collection = $this->_parent->{$this->_through};

        foreach ($collection as $key => $entity) {
            if (!($entity instanceof Model)) {
                throw new ORMException('Error, `indexOfId()` is only available on models.');
            }
            if ($entity[$this->_using]->id() === $id) {
                return $key;
            }
        }
        return -1;
    }
372591
public function getID($ID)
    {
        if($this->hasID($ID)) {
            return $this->offsetGet($this->safeOffset($ID));
        } else {
            throw new CollectionIDNotFoundException('ID "' . $ID . '" does not exist in collection');
        }
    }
873033
public function updateCollector($collectorId, array $data = [])
	{
		return $this->sendRequest(
			$this->createRequest('PATCH', sprintf('collectors/%s', $collectorId), [], $data)
		);
	}
538433
public function index($resourceId)
    {
        $resource = $this->resource->with('fields')->where('id', $resourceId)->first();

        return view('laramanager::resources.fields.index', compact('resource'));
    }
1078661
public function update($collectionName, $data)
    {
        $sql = $this->dialect->grammarUpdate($collectionName, $data);

        $stid = oci_parse($this->raw, $sql);

        oci_bind_by_name($stid, ":id", $data['id']);

        foreach ($data as $key => $value) {
            oci_bind_by_name($stid, ":".$key, $data[$key]);
        }

        $result = oci_execute($stid);

        oci_free_statement($stid);

        return $result;
    }
705320
public function listIndexes($collectionName, $options = [])
    {
        $this->document = $this->db->getQueryBuilder()->listIndexes($collectionName, $options);

        try {
            $cursor = $this->execute();
        } catch (Exception $e) {
            // The server may return an error if the collection does not exist.
            $notFoundCodes = [
                26, // namespace not found
                60 // database not found
            ];
            if (in_array($e->getCode(), $notFoundCodes, true)) {
                return [];
            }

            throw $e;
        }

        return $cursor->toArray();
    }
945033
public function collection($collectionMethod = null)
    {
        $collection = collection($this->_loaded);
        if (is_callable($collectionMethod)) {
            return $collectionMethod($collection);
        }

        return $collection;
    }
228600
protected function setCollection($collection_id)
    {
        $this->data_collection = array();

        if (is_numeric($collection_id)) {

            $conditions = array(
                'language' => 'und',
                'collection_id' => $collection_id
            );

            $this->data_collection = $this->collection->get($conditions);

            if (empty($this->data_collection)) {
                $this->outputHttpStatus(404);
            }

            $this->prepareCollection($this->data_collection);
        }
    }
701346
public function clientGetByDbid($dbid)
  {
    foreach($this->clientList() as $client)
    {
      if($client["client_database_id"] == $dbid) return $client;
    }

    throw new Exception("invalid clientID", 0x200);
  }
1051305
public function index(): PaginatedDataInterface
    {
        $builder = $this->createIndexModelBuilder();
        $data    = $this->fetchResources($builder, $builder->getModelClass());

        return $data;
    }
160331
public function load($collection)
    {
        $collectionId = $this->getCollectionId($collection);

        if ($this->isValidCollectionId($collectionId)) {
            throw new ClientException('Cannot alter a collection without a collection id');
        }

        $result = $this->getConnection()->put(
            UrlHelper::buildUrl(Urls::URL_COLLECTION, [$collectionId, self::OPTION_LOAD]),
            ''
        );

        return $result;
    }
320765
public function archive($id)
    {
        $id = (int) $id;
        if ($id <= 0) {
            throw new Exception('Invalid param id');
        }
        $data = [];
        $data['id'] = $id;
        $data['status'] = 'archived';
        return $this->update($data);
    }